table - abc
record 1 -- {"count": 0, "groups": ["paddy traders", "wheet traders", "dal traders"], "apmcid": "33500150180006", "issent": 0, "userid": "m0000020prfreg2015050636624494uss1"} record 2 -- {"count": 0, "groups": ["x traders", "y traders", "z traders"], "apmcid": "566565656", "issent": 0, "userid": "5435435435345435435435"} these records in abc table, querying below first record expected return not able so. pls me querying on records contains list data inside.
"select * abc data->>'groups'->'paddy traders'";
mysql not yet support json directly, unless on version >= 5.7 (see here nice blog post concerning json in mysql 5.7)
therefore can field in json stored, interpret json library of choice , whatever need doing.
Comments
Post a Comment