I make such a request:
mysql_query("DELETE FROM message WHERE username='".$_SESSION['username']."'")or die(mysql_error());
But he does not do anything, and still need to delete all the records, please tell me the error
I make such a request:
mysql_query("DELETE FROM message WHERE username='".$_SESSION['username']."'")or die(mysql_error());
But he does not do anything, and still need to delete all the records, please tell me the error
Request to variable: $q="DELETE FROM message WHERE username='".$_SESSION['username']."'";
Make a dump or simply print it out. Enter your request in mysqld or PMA and see the server response. We write it here
Well then so
mysql_query("DELETE FROM message WHERE username='".$_SESSION['username']."' LIMIT 1")or die(mysql_error());
If it doesn't help, then var_dump ($ _ SESSION) to the studio
Try this:
$username = $_SESSION['username']; mysql_query("DELETE FROM message WHERE username='$username'")or die(mysql_error());
Source: https://ru.stackoverflow.com/questions/64809/
All Articles