Search mysql row result for certain values
Posted on 2011-04-18
i have a field in mysql for each person that contains a string of permissions that correlates with different programs they can view.
The field is varchar(300).
After I extract the row out in my php program, I want to run a function that searches for any numbers that I may specify in any order.
For somebody like me with all the permissions, the value would look like 1,2,3,4,5,6,7,8,9.
However, for some of the less powerful people, it may look like, 2,5,7
How can I have it search for anybody who has permission 2 or 7 and allow access or 1, 3, and 5?