SELECT * FROM gallery_images WHERE ALBUM_ID='7' AND VISIBLE='on' AND TITLE<'Cobra Huntin'' ORDER BY TITLE LIMIT 0,1
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 ''Cobra Huntin'' ORDER BY TITLE LIMIT 0,1' at line 1