Forum Moderators: coopster

Message Too Old, No Replies

MySQL get index

         

orion_rus

4:44 pm on Dec 1, 2004 (gmt 0)

10+ Year Member



Hello world i have a database. I load a hotel information there. I have one column set as primary key auto increment. Then i save information with NULL option its autoincrement max key in the database and saves it with such key. After it i have to store some links to images. But i need to know what index gives autoincrement to a key? is any decision how it be?

coopster

4:57 pm on Dec 1, 2004 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



You can find the value used for an AUTO_INCREMENT column by using the LAST_INSERT_ID() [dev.mysql.com] function. A quick search on WebmasterWorld for "LAST_INSERT_ID()" will turn up a few examples.