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 ') limit 10' at line 50
Query:
SELECT
p.id,
p.addDate,
p.name,
p.price,
p.discountPrice,
p.clientPrice,
p.productCode,
p.barCode,
p.specialOffer,
p.specialOfferTime,
p.isNew,
p.isNewTime,
p.isSetProduct,
p.highlight,
p.highlightTime,
p.recommend,
p.finalSale,
p.finalSaleTime,
p.notBuyable,
p.vat,
p.amountInPackage,
SUM(wp.inventory) inventory,
p.unlimitedInventory,
p.status,
p.rank,
p.ignoreUserDiscount,
cn.heading categoryName,
cn.seoName categorySeoName,
c.id categoryID,
c.rank categoryRank,
c2.rank categoryMainRank,
m.name makerName,
m.logo makerLogo,
m.seoName makerSEO
FROM
cms_mod_shop_product p
INNER JOIN cms_mod_shop_product_category pc ON pc.productID = p.id
INNER JOIN cms_mod_shop_category c ON c.id = pc.categoryID and c.hide ="0"
INNER JOIN cms_mod_shop_translation cn ON cn.itemID = c.id and cn.langID ="1" and cn.type="cat"
LEFT JOIN cms_mod_shop_maker m ON m.id = p.makerID
LEFT JOIN cms_mod_shop_category c2 ON c2.id = c.mainID
LEFT JOIN cms_mod_shop_warehouse w ON w.deleted="0" AND w.ignoreAmounts="0"
LEFT JOIN cms_mod_shop_warehouse_product wp ON wp.productID = p.id AND wp.warehouseID = w.id
WHERE
p.deleted ="0" and (COALESCE(UNIX_TIMESTAMP(p.expire),0) = 0 or p.expire > "2024-09-21 00:00:00") and p.id IN (0) and (( wp.inventory > "0" or p.unlimitedInventory = "1") or p.isSetProduct="1") and p.hide = "0"
GROUP BY p.id order by IF(p.highlight="1", IF(p.highlightTime > "2024-09-21" OR p.highlightTime = "0000-00-00", "1", "0"), "0") DESC, FIELD(p.id,) limit 10
Location: /data01/virt97846/domeenid/www.ugandiresto.ee/htdocs/sajuga.ee/module/shop/classes/Shop.php:Line 2903