DB Error: syntax error
SELECT gi.image_id FROM gallery_images AS gi, gallery_images_categories AS gic WHERE gi.image_id = gic.image_id AND gic.cat_id = AND gi.approved = 1 [nativecode=1064 ** 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 gi.approved = 1' at line 1]