I’m trying to get a successful result if rows in 2 tables were deleted, but my query only executes the first query and then bring back the result as successful, how do I go about this?
if (mysql_query("DELETE FROM ex_test_taken WHERE userid1 = '$userid2' AND testid1 = '$tid2'") && ("DELETE FROM ex_answer WHERE name = '$userid2' AND testname = '$tid2'")) {
echo "Sucesfull";
} else {
echo "Failed";
}
Your code is:
So you’re basically running one query… try: