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
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
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
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