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 '-25, 25' at line 1SELECT * FROM tagok_adatai WHERE birthday > 1 AND on_b_count='1' AND on_count='1' ORDER BY birthday LIMIT -25, 25