getting id or record just inserted

2001-11-29 Thread Matt Graham
Hello: 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

RE: getting id or record just inserted

2001-11-29 Thread Bryan Waters
Take a look at the LAST_INSERT_ID() function. -bryanw HalfPriceNames Domain Registry http://www.halfpricenames.com/ -Original Message- From: Matt Graham [mailto:[EMAIL PROTECTED]] Sent: Thursday, November 29, 2001 9:12 AM To: '[EMAIL PROTECTED]' Subject: getting id or record just

RE: getting id or record just inserted

2001-11-29 Thread Fulko Hew
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

Re: getting id or record just inserted

2001-11-29 Thread sherzodR
last_insert_id() should work D Alast_insert_id() MG: recall something about @@Identity. Does MySQL have something similar? I MG: know I can always just query Max(ID), but that's not always the safest bet. MG: MG: reply to [EMAIL PROTECTED] as I have not subscribed to the