[UPHPU] Sequentially number records with php/mysql

Keith Pettit keith at setuplinux.com
Wed Nov 10 10:53:44 MST 2004

Hash: SHA1

I like to use the database as much as possible. I'd just use the MySQL
auto_increment feature.

Usually I create a table with some sort of ID field and make it the
primary key, and also make it auto_increment.  Then when you're app puts
in new records into the jobs table (or whatever it is) the ID number is
automatically generated, and it's unique.

Ashley Oviatt wrote:
| Hi.
| 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.
| Ashley
| _______________________________________________
| UPHPU mailing list
| UPHPU at uphpu.org
| http://uphpu.org/mailman/listinfo/uphpu
| IRC: #uphpu on irc.freenode.net
| Sponsored by hostinginferno.com!

- --
Keith Pettit
keith at setuplinux.com
jabberid: keith at setuplinux.com
Version: GnuPG v1.2.4 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org


More information about the UPHPU mailing list