...

View Full Version : getting a new link id (simple question)



lli2k5
09-03-2006, 08:22 PM
I have a mysql database and I would like to generate a new link id that has a higher value than the current link id in the database.

This is probably a simple question, but how do you make a query to ensure that you get a higher id for the newer items you add in the database?

Fumigator
09-03-2006, 09:20 PM
The easiest way is to make your primary key auto-increment when you create the table.

http://dev.mysql.com/doc/refman/4.1/en/example-auto-increment.html



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum