coplan Posted March 29, 2007 Share Posted March 29, 2007 I have a very simple issue. I have a bunch of data I'm inserting into a database to create an article. When complete, I want to redirect to the article, but I need the node_id. It just so happens that the node_id is the Primary key and is automatically generated by mySQL at insertion time. Is there an easy way to get the value of the Primary key for the most recent insertion? Link to comment https://forums.phpfreaks.com/topic/44746-getting-primary-key-value-of-last-database-insertion/ Share on other sites More sharing options...
papaface Posted March 29, 2007 Share Posted March 29, 2007 mysql_insert_id() Link to comment https://forums.phpfreaks.com/topic/44746-getting-primary-key-value-of-last-database-insertion/#findComment-217268 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.