I don't know if it would work but you could try to put ... OR ... into brackets:
$query_items = "SELECT * FROM games WHERE (one='".$clanref."' OR two='".$clanref."') AND status='challenge' ORDER by tableid";
It might be that it treated your conditions like ... OR (... AND...)