For some reason my queries aren't working in my PHP script, I'm essentially trying to make a query that gets all players whos points are greater than 0 though I'm also trying to get some players whos points are equal to 0 but whos qualified amount is greater than 0. My example code is below.
Example
$sql = "
SELECT * FROM allplayers WHERE points > 0 ORDER BY points DESC
SELECT * FROM allplayers WHERE points = 0 and qualified > 0
";
$q = $pdo->query($sql);
while ($dnn = $q->fetch()) {
//script
}
Table example
player points qualified
Alex 90 1
Amy 0 1
Jimmy 200 0
John 0 0
The query is trying to get back everyone in the table except john whos points = 0 and who hasn't qualified (qualified = 0) Thanks for reading :)