Page 1 of 1

Mysql last_insert_id() - help

Posted: Tue Mar 18, 2008 3:52 am
by thamizhchelvan
Hi,

Is it possible to get the last_insert_id() in mysql at any time?, means without doing any insertion.

Thanks in advance

Re: Mysql last_insert_id() - help

Posted: Tue Mar 18, 2008 4:17 am
by Christopher
You can call the function, but you need to check the documentation to see what the return value is before any insert is done.