I would like to know the ID of the updated row and I tried this:
$sql = $db->prepare("UPDATE `timeslots` SET `service` = ? WHERE `status` = ?");
$sql->bind_param("is", 0, "open");
$sql->execute();
if ($sql->execute()) {
echo "ID: ".$db->insert_id."<br />";
}
But the result is everytime this instead of the ID:
ID: 0
ID: 0