Forum Moderators: coopster

Message Too Old, No Replies

last inserted

         

bleak26

4:16 pm on Jan 4, 2006 (gmt 0)

10+ Year Member



Hi ,this one has been in the back of my mind for ages.
Is there a method to retrive , say the autoincremented value of field of a record, as you insert the record into your mysql database.
thanks guys and girl.

dreamcatcher

4:31 pm on Jan 4, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



mysql_insert_id()

[uk2.php.net...]

dc

coopster

4:32 pm on Jan 4, 2006 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Not as you enter it in, but right after that you can retrieve the value with LAST_INSERT_ID() [dev.mysql.com].

thanks dc ;-)