I\'m storing a list of items in a serialized array within a field in my database (I\'m using PHP/MySQL).
I want to have a query that will select all the records that
There is a good REGEX answer above, but it assumes a key
and value
implementation. If you just have values
in your serialized array, this worked for me:
value only
SELECT * FROM table WHERE your_field_here REGEXP '.*;s:[0-9]+:"your_value_here".*'
key and value
SELECT * FROM table WHERE your_field_here REGEXP '.*"array_key_here";s:[0-9]+:"your_value_here".*'
Select * from table where table_field like '%"enter_your_value"%'