MySQL Error Occured
1064: 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 ') ) AND ( CubeCart_inventory.productId IN ( SELECT DISTINCT CubeCart_options...' at line 1

QUERY = SELECT DISTINCT CubeCart_inventory.cat_id, CubeCart_cats_idx.productId, productCode, image, image1, price_mefpa AS price, sale_price_mefpa AS sale_price, ekptwtiki_price,showNewp, timestamp_ekptwsi_start, timestamp_ekptwsi_end, final_price, dia, name, available, tampelaki, blackfriday, useStockLevel, stock_level FROM CubeCart_cats_idx INNER JOIN CubeCart_inventory ON CubeCart_cats_idx.productId = CubeCart_inventory.productId WHERE CubeCart_cats_idx.cat_id IN (393) AND active='1' AND isPhotos='0' AND isNews='0' AND ( CubeCart_inventory.productId IN ( SELECT DISTINCT CubeCart_options_bot.product AS productId FROM CubeCart_options_bot WHERE option_id = 23 AND value_id = ) ) AND ( CubeCart_inventory.productId IN ( SELECT DISTINCT CubeCart_options_bot.product AS productId FROM CubeCart_options_bot WHERE option_id = 27 AND value_id = 172 ) ) AND syllogi LIKE 'Cities Collection'ORDER BY CubeCart_inventory.productId DESC, productId DESC