last_insert_id return 0
Posted: Fri Apr 27, 2007 2:42 pm
Whatever i try, it still retuns 0. In php script, in mysql query browser, every insert id return 0.
MySQL version 4.1.2
MySQL version 4.1.2
A community of PHP developers offering assistance, advice, discussion, and friendship.
http://forums.devnetwork.net/
and your table structure.Jcart wrote:Post your code.
http://dev.mysql.com/doc/refman/5.0/en/mysql-insert-id.html wrote:Note that mysql_insert_id() returns 0 if the previous statement does not use an AUTO_INCREMENT value.