Hi-o! I was wondering if it's possible when inserting a value into a table
that has an auto_increment field to have MySQL return the value of the
auto_increment field right after doing the insert, w/out having to run a
seperate query? 
For example if I had a table with two collums, ID and name. Where ID is an
int field with auto_increment set, and is the primary key. and name is
just a varchar. and did this:

INSERT INTO some_table (name) VALUES("bob");

I'd like for the query to return the value for ID that was just assigned.
Is there a way to do this all in one SQL statement? 

Thanks in advance!

"Listen: We are here on Earth to fart around. Don't let anybody tell you
any different!" - Kurt Vonnegut

Josh Burroughs
[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

Reply via email to