So I'm trying to pick 2 rows randomly but the id isn't allowed to be equal to x or equal to y.
That's what I tried so far:
$statment = $db -> "SELECT * FROM player ORDER BY RAND() LIMIT 2 WHERE
NOT(id = ?) OR WHERE NOT(id=?)";
$statement->execute(array($player1, $player2));
But getting:
Parse error: syntax error, unexpected '"SELECT * FROM player ORDER BY' (T_CONSTANT_ENCAPSED_STRING), expecting identifier (T_STRING) or variable (T_VARIABLE)