Also, triggers or the like that grab a new id (even if left unused) may b affecting it. One kludge, perhaps, to guarantee it to work, would be to use a stored procedure to do the insert, run the select, and return the result from the select to you.
If a trigger modifies the data for LAST_INSERT_ID, how could a stored procedure executing INSERT and SELECT LAST_INSERT_ID() guarantee that the data is not overwritten?
Alexander
In reply to Re^2: SELECT LAST_INSERT_ID does not work
by afoken
in thread SELECT LAST_INSERT_ID does not work
by Vagabundo
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |