I am creating a mini custom CMS for my website and I have just created a little function where I can delete rows from my contact table. I am using Ajax to display and retrieve the data and it's working just fine.
Problem is, I just sent myself another message to check things and the id which has returned has left off from where the last id was.
I'm using mysqli prepared statements which you can see below:
Is there a certain command I can use to reset the id at the same time I delete a row?
$conn = new mysqli("#","#","#","#") or die();$stmt = $conn->prepare("DELETE FROM myTable WHERE id=?") or die();$stmt->bind_param("i", intval($_GET['rid']));$stmt->execute();$stmt->store_result();