Matt Graham <[EMAIL PROTECTED]> asked

> Can anyone tell me how to get the id of a row just inserted?  In MS-SQL I
> recall something about @@Identity.  Does MySQL have something similar?  I
> know I can always just query Max(ID), but that's not always the safest bet.
> 
> reply to [EMAIL PROTECTED] as I have not subscribed to the mailing
> list...yet.

Check out: last_insert_id()

-------------------------------------------------------------------------------
Fulko Hew,                           Voice:  905-681-5570
Senior Engineering Designer,         Fax:    905-681-5556
SITA (Burlington)                    Email:  [EMAIL PROTECTED]
777 Walkers Line,
Burlington, Ontario, Canada, L7N 2G1

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to