From http://dev.mysql.com/doc/mysql/en/mysql_insert_id.html
Note that mysql_insert_id() returns 0 if the previous statement does not use an AUTO_INCREMENT value. If you need to save the value for later, be sure to call mysql_insert_id() immediately after the statement that generates the value.The value of mysql_insert_id() is affected only by statements issued within the current client connection. It is not affected by statements issued by other clients.
In reply to Re: Is last_insert_id for msyql reliable with DBI?
by drewbie
in thread Is last_insert_id for msyql reliable with DBI?
by neilwatson
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |