On Aug 19, 1:17 pm, Fred <F...@notspam.notwrote:
if my query is a regular INSERT, then mysql_insert_id() works as expected.
But if I use a Stored Procedure to do my insert, then mysql_insert_id() returns 0
How can I get a returned autoincrement (my primary key) when using a stored
procedure? Thanks.
Try using the stored procedure itself to return the
inserted id or change the stored procedure by a
function -- I don't know if it is allowen in MySQL.
Also, the return value of the stored procedure can
be used to verify the integrity of the insert statement.
Regards,
DMW