Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- Using LAST_INSERT_ID()
- Vic Spainhower
October 1, 2005, 4:45 pm
rate this thread
I am trying to get the value of the Auto-Incremented key that was assigned
using LAST_INSERT_ID(). However, when I execute the following PHP statements
after the insert I only get: "value of entryID: Resource id #7" after EVERY
insert (it never changes).
What am I doing wrong?
Thanks very much!
$_SESSION["entryID"] = (mysql_query ('SELECT LAST_INSERT_ID() FROM
$entryID = $_SESSION["entryID"];
echo "value of entryID: $entryID";
- Kim AndrÃ© AkerÃ¸
October 2, 2005, 10:27 am