Exception: Error: FUNCTION oc_patoshka.0AND does not exist
Error No: 1305
SELECT COUNT(DISTINCT res.product_id) AS total FROM (SELECT CASE WHEN ps.price IS NOT NULL THEN ps.price/cur.value ELSE p.price/cur.value END AS price, p.product_id FROM oc_product p LEFT JOIN oc_product_to_store p2s ON (p.product_id = p2s.product_id) LEFT JOIN oc_product_special ps ON (p.product_id = ps.product_id) LEFT JOIN oc_currency cur ON (cur.currency_id = p.currency_id) WHERE p.status = '1' AND p.date_available <= NOW() AND p2s.store_id = '0' AND ROUND(((p.price - ps.price) / p.price) * 100) >= '15' AND p.quantity>0AND ((ps.date_start = '0000-00-00' OR ps.date_start < NOW()) AND (ps.date_end = '0000-00-00' OR ps.date_end > NOW()))) res in /var/www/sites/platoshka.com.ua/httpdocs/system/library/db/mysqli.php on line 58