MySQL select * from users where "the nth character of the string within permissions field is 1"

I have a field called perms in the db that has twenty characters. Each character represents a permission.

How can I write a MySQL query that gives me something like:

MySQL select * from users where "the nth character of the string within permissions field is 1"
LVL 2
smetterdAsked:
Who is Participating?
 
Guy Hengel [angelIII / a3]Connect With a Mentor Billing EngineerCommented:
select * from users where substring(permissions, n, 1) = '1'
0
 
smetterdAuthor Commented:
In the future I promise I will put each permission is a separate field... so please don't advise me to do that right now... I can't!
;-)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.