Not at localhost (wampserver) but I am getting an SQL error at live site while trying this query below:
$condition .= db_quote(" AND NOT JSON_CONTAINS(a.hb_items->'$[*].totalHBDiscount', '\"0.00\"', '$') ");
the whole query:
SELECT a.hb_kampanyakodu,a.hb_paketno,a.hb_orderid,a.hb_items,a.timestamp,a.order_id, a.hb_items->'$[*].totalHBDiscount' as total_discount FROM cscart_orders AS a WHERE 1 AND a.payment_id IN ('25') AND NOT JSON_CONTAINS(a.hb_items->'$[*].totalHBDiscount', '"0.00"', '$') AND a.timestamp >= 1551387600 AND a.timestamp <= 1552312950 ORDER BY a.order_id desc LIMIT 0, 20
Error:
[{"sku":"HBV000008CJIQ","quantity":1,"rate":"12","vat":32.17,"commission":25.31,"unitHBDiscount":"0.00","totalHBDiscount":"0.00"},{"sku":"HBV000004VVDF","quantity":1,"rate":"12","vat":39.64,"commission":31.19,"unitHBDiscount":"0.00","totalHBDiscount":"0.00"}]
PHP version at localhost is 7.0
PHP version at livesite is 7.2
what is the reason of this issue?
BTW, my mainly purpose is filtering result according to the value in json coded array value in database.