i'm having trouble mixing AND & OR in an SQL query.
how would i do this:
Code:
select game_id from tictactoe where winner IS NOT NULL and p1_id='$userid' or p2_id='$userid' order by game_id desc limit 10
i need it to select a row where the winner is not null, .. but either p1_id or p2_id can equal $userid
this doesn't work for some reason