Jump to content

Getting Primary Key value of Last Database Insertion


coplan

Recommended Posts

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?

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.