I want to execute a query that insert the insert id to one of the colums
And I want to know how to get the insert id I read this answer Get inserted id from mysql insert procedure but its talk about how to get the insert id after the query, And I want to get it when I do the query
I try to do:
$stmt = $db->prepare("INSERT INTO `files` (`name`, `fname`) VALUES (?, LAST_INSERT_ID() + ?)") or die($db->error);
$stmt->bind_param('ss', $name, $uniqid);
But its dosent work, I always get 56, also the contcat dosent work, what I need to do?