At 20:08 -0500 12/14/02, Michael T. Babcock wrote:
Peter Lovatt wrote:
mysql_insert_id
should do it!
According to documentation somewhere, last insert can sometimes
return a different value than the most recent insert if the most
recent insert failed.
Why is this a problem? If the most recent insert failed, you wouldn't
expect to get a reasonable ID value. If you were wanting to get
the value from the previous insert, you should have gotten its ID before
attempting another insert anyway.
What is a better solution?
--
Michael T. Babcock
C.T.O., FibreSpeed Ltd.
http://www.fibrespeed.net/~mbabcock
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php