08.02.2014, 01:44
Dont debug mysql queries in php. Use phpmyadmin or the command line to test your queries before using them in php scripts. This way you can eliminate php problems and optimize your queries without modifying and reuploading your php scripts again and again.
For the query itself, use brackets
SELECT * FROM `playerdata` WHERE (`Banned` IS NULL OR `Banned` = 0) AND `Admin` > 0 ORDER BY `playerdata`.`PlayersBanned` DESC LIMIT 0, 10
If this doesnt work its probably the database itself, as the query shouldnt cause any other problems.
For the query itself, use brackets
SELECT * FROM `playerdata` WHERE (`Banned` IS NULL OR `Banned` = 0) AND `Admin` > 0 ORDER BY `playerdata`.`PlayersBanned` DESC LIMIT 0, 10
If this doesnt work its probably the database itself, as the query shouldnt cause any other problems.