Just my 50 cents for this issue, I simply noticed that you won't get a LAST_INSERT_ID
greater than 0
if your table has no AUTO_INCREMENT
set to an index.
I wasted about half hour on this. Turns out I keep getting a LAST_INSERT_ID()
of 0
, which for this table is actually ok.