Jump to content

get back ID number of inserted record


chelnov63

Recommended Posts

Hi I'm using php and mysql... Im inserting a record and need the id number back of the record just inserted .. e.g

 

$insertSQL = "INSERT INTO articles (title, summary, description, author, company, publish_date, article_type, live) VALUES ('$title', '$summary', '$description', '$article_type', '$author', '$company', '$publish_date', '$live')";

 

Is there a way to get back the id number of the record just inserted? thanks

Link to comment
https://forums.phpfreaks.com/topic/140918-get-back-id-number-of-inserted-record/
Share on other sites

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.