Fast question about a query
#7

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.
Reply


Messages In This Thread
Fast question about a query - by Face9000 - 07.02.2014, 18:35
Re: Fast question about a query - by Emmet_ - 07.02.2014, 18:40
Re: Fast question about a query - by Face9000 - 07.02.2014, 18:46
Re: Fast question about a query - by sammp - 07.02.2014, 18:58
Re: Fast question about a query - by GWMPT - 07.02.2014, 19:08
Re: Fast question about a query - by Face9000 - 07.02.2014, 19:15
Re: Fast question about a query - by Mauzen - 08.02.2014, 01:44
Re: Fast question about a query - by Face9000 - 08.02.2014, 09:27

Forum Jump:


Users browsing this thread: 2 Guest(s)