I'm trying to make a query, to find out if a player is in a match, and if his status isn't quit (6). The query below isn't working though. What am I doing wrong?
Thanks
$query = mysql_query("SELECT * FROM matches WHERE
(player1Name = '$name' AND player1Status != 6) ||
(player2Name = '$name' AND player2Status != 6) ||
(player3Name = '$name' AND player3Status != 6) ||
(player4Name = '$name' AND player4Status != 6) ||
(player5Name = '$name' AND player5Status != 6) ||
(player6Name = '$name' AND player6Status != 6)
");
echo $queryand check what it the result? I have reached you problem. just tell me immediately.