I'm working with a table that has a field called other_group_ids that is of type varbinary(255). An example vale of it would be: 3,7,14. I have a query that checks to see if a user is in a certain group. For instance, to check if they're in group 4, I do a LIKE on it:
SELECT user.* FROM users AS user WHERE user.other_group_ids LIKE '%4%';
This works just fine, but the problem is that it's also catching on 14. How can I change my query to make it just match on 4, but not other values like 14 or 41?
Thank you very much for any insights!