I think that the mysql function LAST_INSERT_ID() is what you need. Tim Johnson wrote:
Hello All: If I am adding a row to a table that has an auto-increment field, is there a way to query MySQL for the value of that field, once the new row is added? TIA
-- ------------------------------------------------- - Nikolas Galanis - - Computer Engineering & Informatics Department - - University of Patras - - http://www.ceid.upatras.gr - - 061 997707 - ------------------------------------------------- --------------------------------------------------------------------- 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