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! 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 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
Archived
This topic is now archived and is closed to further replies.