Answer the question
In order to leave comments, you need to log in
JSON search in MySQL doesn't want to work?
Hello to all!
I have a mysql 5.7
table with a JSON type items field with data:
{"2464": {"price": "122.97", "status": "10", "quantity": "1", "articleid": "2464", "warehouseid": "3"}, "2469": {"price": "165.61", "status": "10", "quantity": "1", "articleid": "2469", "warehouseid": "3"}, "2522": {"price": "64.18", "status": "10", "quantity": "1", "articleid": "2522", "warehouseid": "3"}, "2524": {"price": "198.73", "status": "10", "quantity": "1", "articleid": "2524", "warehouseid": "3"}}
SELECT * FROM `table` WHERE `items`->'$.*.status' = ':status'
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question