Getting the value of a row you just inserted

2003-10-09 Thread Dan Anderson
Is it possible to SELECT the id (indexed PRIMARY KEY AUTO_INCREMENT) of a row that was just inserted? I'm using PHP, I don't know if that makes a difference? Something like: INSERT INTO foo (bar) VALUES (bar); SELECT last_insert(id) FROM foo; Also, are there any problems with using this in an

RE: Getting the value of a row you just inserted

2003-10-09 Thread Christensen, Dave
Here's the link to the on-line manual page that will help you. http://www.mysql.com/doc/en/example-AUTO_INCREMENT.html -Original Message- From: Dan Anderson [mailto:[EMAIL PROTECTED] Sent: Thursday, October 09, 2003 5:06 PM To: [EMAIL PROTECTED] Subject: Getting the value of a row you

Re: Getting the value of a row you just inserted

2003-10-09 Thread todd
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Thursday 09 October 2003 06:06 pm, Dan Anderson wrote: : Is it possible to SELECT the id (indexed PRIMARY KEY AUTO_INCREMENT) of : a row that was just inserted? I'm using PHP, I don't know if that makes : a difference? : : Something like: : :