I have 1 table named customer, there is a field named custom_id which contains related data.
{"18":["45","48","91"],"20":["82","83",84],"21":["30","31"]}
now I want to query the customer who has "20":["82","83","84"] in this field.
"20": this part what I want, and the related part my conditions (82,83,84)
the result will show if any customer has "82" or "83" or "84" after "20":
how can I query these conditions from this field using regexp.
here is the example:
SELECT * FROM `customer` WHERE `custom_id` REGEXP '"20":["82","83","84"]'
as you can see if I add [ ] system will not accept it like a string, and also these fields are (82, 83, 84) dynamic, anytime I can change it according to query.
thanks in advance.