Get last inserted id using MySQL & PHP
Get last inserted id using MySQL & PHP
#Get last inserted id SQL
$sql = "INSERT INTO `myTable` ( `id` , `name` )VALUES ( NULL, 'test');";
# execute query
$bdConnection->runQuery($query);
# get the last inserted id value
$lastInsertedId = mysqlid($bdConnection);
Go Back