I have this query:
$query = "SELECT pic_square,
name,
highest_score,
num_tries,
avg_total
FROM users
WHERE NOT played_game = '0'
ORDER BY avg_total DESC";
Where I select pic_square
,name
,highest_score
,num_tries
and avg_total
FROM for all users that
DO NOT have their played game set as ''0''.
I would like to add another condition so I select only the users that:
- DO NOT have their played_game set as ''0''
- DO NOT have their name empty
PS: The name cannot be null, it just can be empty, I cannot change the DB structure itself.
So how do I add these dual WHERE NOT together?