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 '-8, 8' at line 8 (SELECT a_id FROM t_anunturi AS a INNER JOIN t_anunturi_detalii AS ad ON ad_anunt=a_id INNER JOIN t_localitati AS loc ON a_localitate=loc_id WHERE 1 AND a_activ=1 AND a_sters=0 AND a_tip='5' AND a_inchiriere=1 ORDER BY a_data DESC LIMIT -8, 8 ) |