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 art_dibujos.artID < 142 ORDER BY art_dibujos.artID DESC LIMIT 1' at line 1