I'm trying to correctly move all rows from one table to another and then delete them from the original table without resetting the auto_increment value.
The following seems to reset the auto_increment value... any idea what I am doing wrong?
$sql1 = "INSERT INTO archive SELECT * FROM main";
$result1 = mysqli_query($sqlsession, $sql1) or die(mysqli_error());
$sql2 = "truncate main";
$result2 = mysqli_query($sqlsession, $sql2) or die(mysqli_error());