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 mailing
MG: list...yet.
MG:
MG: Thank you,
MG:
MG:
MG: Robert "Matt" Graham, Esq.
MG: Product Manager
MG: THE AGOS GROUP, LLC
MG: [EMAIL PROTECTED]
MG:
MG:
MG: -
MG: Before posting, please check:
MG:http://www.mysql.com/manual.php   (the manual)
MG:http://lists.mysql.com/   (the list archive)
MG:
MG: To request this thread, e-mail <[EMAIL PROTECTED]>
MG: To unsubscribe, e-mail 
<[EMAIL PROTECTED]>
MG: Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
MG:

-- 
sherzodR <[EMAIL PROTECTED]>
use CGI::Session;


-
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




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




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 inserted


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 mailing
list...yet.

Thank you,


Robert "Matt" Graham, Esq.
Product Manager
THE AGOS GROUP, LLC
[EMAIL PROTECTED]


-
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



-
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




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 mailing
list...yet.

Thank you,


Robert "Matt" Graham, Esq.
Product Manager
THE AGOS GROUP, LLC
[EMAIL PROTECTED]


-
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