Reputation: 7875
I have a MySQL column with associative arrays. I'd like to create a select query where ["xyz":"somevalue"]
below is how data is in the column :
{"abc":"0","xyz":"1"}
Upvotes: 0
Views: 153
Reputation: 780889
Use LIKE
to match it:
WHERE column LIKE '%"xyz":"somevalue"%'
It's a bad idea to store your data in JSON format like this if you need to be able to match it in queries. You should create an attribute table that contains each value as a separate row.
Upvotes: 2