SELECT id, CASE END as cid, collections_id FROM ( SELECT collections_id, FROM products JOIN prodscategs on prodscategs.products_id = WHERE collections_id IN () and categories_id=97 and in (select products_id from prodimages where products_id = ORDER BY display_order) q2 order by cid LIMIT 0, 29

Error: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'as cid, collections_id FROM ( ' at line 3
#0 /home/abbydresses/public_html/modules/Category/Category.php(345): DataBase->query('SELECT\n ...')
#1 /home/abbydresses/public_html/templates/backnwhite/ Category->loadPage(0, true, false, true, 2)
#2 /home/abbydresses/public_html/dispatcher.php(424): include_once('/home/abbydress...')
#3 {main}