Last Inserted ID?
View Single Post
12-01-2007, 09:02 PM
Join Date: Nov 2007
Incidentally, you can often solve an odd problem like this by using straight SQL, e.g.
(using SQL to retrieve the ID value and store as a variable)
SELECT @last_id:= LAST_INSERT_ID();
Now whenever you need to retrieve that value or use it within an SQL statement (all within the same login session, e.g. same script execution of course), just refer to it using the MySQL variable
. Several calls to mysql_query() later it will still be the same value.
View Public Profile
Send a private message to SOCK
Find More Posts by SOCK