Sql Query Issue While Using Json_Contains

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:

Data in database I am serching in:
[{"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.

Looks like the issue is caused by 3rd party addon

http://prntscr.com/mwcx8m

Please contact addon developer

I didn't understand what does it mean that you sent.

PS: I am the developer.

Looks like JSON_CONTAINS is not used correctly. Please check documentation
https://dev.mysql.com/doc/refman/8.0/en/json-search-functions.html

Thanks for your help. But I realized that the problem is not based on the usage of JSON_CONTAINS, it is based on MYSQL version. JSON_CONTAINS works on MYSQL 5.7 or later. The problem has gone after updating MYSQL to 5.7.

Thanks for your help. But I realized that the problem is not based on the usage of JSON_CONTAINS, it is based on MYSQL version. JSON_CONTAINS works on MYSQL 5.7 or later. The problem has gone after updating MYSQL to 5.7.

Thank you for letting us know it