[SOLVED] retrieving auto_inc upon insertion

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
magicrobotmonkey
Forum Regular
Posts: 888
Joined: Sun Mar 21, 2004 1:09 pm
Location: Cambridge, MA

retrieving auto_inc upon insertion

Post by magicrobotmonkey »

If I'm inserting a row where one of the fields is an auto_increment, is there a way to retrieve said number without an additional query? I think this is really simple and my brain's craping out...
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

magicrobotmonkey
Forum Regular
Posts: 888
Joined: Sun Mar 21, 2004 1:09 pm
Location: Cambridge, MA

Post by magicrobotmonkey »

I knew it was simple! Thanks
Post Reply