inktri Posted March 30, 2008 Share Posted March 30, 2008 What's the most efficient way to accomplish the following problem: I have a table called: dogs Attributes: did (primary key, auto increment), name if I run this query within PHP: INSERT INTO dogs (name) VALUES ("bob") How can I echo the "did" of the newly inserted dog? Thanks for the help! Quote Link to comment https://forums.phpfreaks.com/topic/98599-primary-key-is-set-to-auto-increment-after-inserting-new-row-how-to-get-it/ Share on other sites More sharing options...
leonglass Posted March 30, 2008 Share Posted March 30, 2008 I think this may be what you are after Quote Link to comment https://forums.phpfreaks.com/topic/98599-primary-key-is-set-to-auto-increment-after-inserting-new-row-how-to-get-it/#findComment-504618 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.