SELECT a.*, b.name, c.county,d.town,d.id as uid FROM puppy_ads a LEFT JOIN breeds b ON b.id=a.breed LEFT JOIN counties c ON c.id=a.county LEFT JOIN users d ON a.user=d.id WHERE 1=1 AND (a.active='1' OR a.active='0') ORDER BY a.id DESC LIMIT -20,20
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-20,20' at line 6