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 'AND nsr>= AND nsl>1 AND artstate=2 ORDER BY nsl' at line 1SELECT artid,title, nsl, nsr FROM artikel WHERE nsl<= AND nsr>= AND nsl>1 AND artstate=2 ORDER BY nsl