My web application registers a user and saves it in the BD but the id's go 4-9-18-27-48-57-66-75. How do you make the auto increment to be 1? Why can this be happening?
This is the function that inserts the new $ user in the table: * the function receives $ _POST as parameter $ user.
function guardarUsuarioDB($usuario) {
useDB();
global $db;
$sql = "INSERT INTO users VALUES (default,:name, :email, :password)";
$query = $db->prepare($sql);
$query->bindValue(":name", $usuario["name"]);
$query->bindValue(":email", $usuario["email"]);
$query->bindValue(":password", $usuario["password"]);
$query->execute();
$usuario["id"] = $db->lastInsertId();
return $usuario;
}