Is there a straightforward way to run mysql_query with an insert and get the ID of the new row, for example in the return? Or will I have to do another query with select to check it?
views:
90answers:
3
+1
Q:
PHP&MySQL: Is it possible after running mysql_query with an insert to get the ID of the new row?
+2
A:
Simply call mysql_insert_id after running mysql_query and you will get the ID.
Noah Goodrich
2009-03-03 19:51:45