Ok, made a SQL statement following, using the MySQL version of the command... and it returns perfectly fine now.
So, yes, it appears its a PHP function bug, than the MySQL. I tried rearranging the PHP function, doing it immediately, doing it after, doing it before (haha)... and no luck, the darn thing still keeps spitting out a zero.
SO STRANGE. Because it used to work! Haha!
Anyhow, I will just use the SQL statement from now on, and say bye bye to the PHP function version. Flaky.
DLB wrote:
One suggestion:
Try using your insert statements then the command line equivalent of mysql_insert_id() at the mysql command line.
If it works fine at the command line, then you'll know that it's not a mysql problem.