Jump to content

json array in sql search


Recommended Posts

..let's say I store in a mysql column "[1,2,11,12,123]".

How can I make s query to get all those rows that is 1, or is 12, etc ?

I'm using  mysqlnd 5.0.11-dev - 20120503 

Any advise on what technique I should use is welcomed


PS: ..I'm adding a comma to each end, as in  [,1,2,11,12,123,] and will search with like %,12,% .
Not pretty but I'm in a hurry and can't come up with a better solution =/

Edited by argumentum

Follow the link to my code contribution ( and other things too ).
FAQ - Please Read Before Posting.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...