[{"id": 157, "tip": "Coupon", "name": "优惠券"}])
where json_contains(表字段,"要查询的值")
查询;嵌套数组格式({“id”:{“name”:”张三”}})查询name为张三 采用
where json_contains(表字段,"张三", '$."id"."name"')
select * from order_parent where json_contains(discount_detail->'$[*].tip',json_array("Coupon"),'$')
select * from order_parent where json_contains(discount_detail, json_object("tip", "Coupon"))
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号