[UPHPU] Sequentially number records with php/mysql

Wade Preston Shearer lists at anavidesign.com
Wed Nov 10 10:53:51 MST 2004


> I'm setting up a way for people to order business cards from our 
> company.
>
> I have it all finished, but right now I'm just using random #'s to give
> them a job#. What's the easiest way to give them a sequential job
> number? I don't want a database full of unfulfilled orders, but I'm
> guessing that making a record in the db for each new customer is the 
> way
> to go, and then delete the record if the person doesn't order, right?
>
> Anyway, just wanted to knwo what you guys thought.

You can have the database automatically increment and assign a unique 
ID to each new record.

For example, in MySQL, you can set a column to do this with something 
like...

	pid int unsigned auto_increment primary key,


More information about the UPHPU mailing list