note 21781 deleted from function.mysql-insert-id by betz
| From: | betz@php.net | Date: | Sat, 10 Aug 2002 16:59:45 +0000 |
| Subject: | note 21781 deleted from function.mysql-insert-id by betz | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-34759@lists.php.net to get a copy of this message | ||
Be sure to call mysql_insert_id() immediately after your call to mysql_query() to be sure that you
get a valid value.
A recent code I used called mysql_query() then checked for error values, number of rows, etc., and
then mysql_insert_id() which returned nothing. Moving mysql_insert_id() after mysql_query() has
fixed the bug.