Quite a short answer: no, your query did not cause your problem. Your query would have failed, as already said in the comments. The *
will break the query, preventing it from deleting anything. Your problem must have originated somewhere else.
Did my query delete the entire table? [closed]
Pregunta
I ran the query:
$stmt = $dbh->prepare("DELETE * FROM `1_cart_items` WHERE `forid`=?");
$stmt->bindValue(1,$_SESSION['name'],PDO::PARAM_INT);
$stmt->execute();
and I've appeared to delete the entire table, what have I done wrong that has caused this problem?
Solución
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow