Connection Coder Connection Coder - 1 year ago 67
PHP Question

DELETE * FROM TABLE WHERE this=that not working

I'm not sure why this query isn't working! This query is to delete the user's account:

$query = mysqli_query($connection, "DELETE * FROM users WHERE cookie='$cookie'");

HOWEVER, when I replace
, it works! Is my
syntax wrong?

Answer Source

You don't need the * when using DELETE. Just do

"DELETE FROM users WHERE cookie='$cookie'"
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download