What I have:
I have a column in my table with a name privilegesthat stores a privilege row for a user. (-1 = owner, admin = 0, 1 = moderate comments, etc.) So, I would line like this in the sql: 1,2,3.
Problem:
If I wanted to select all users who are admins and moderators administrators, this becomes a bit complicated with the conditions LIKE. Right now, if I want an admin, I am just browsing all the users who are looking for 1 (using PHP is inefficient).
I am looking for a solution that is easily โplugged inโ by plugin developers and easily requested. My solution works, but if users had to grow to hundreds, several times it was possible to ride a bicycle all over them to find a certain privilege.
Does anyone have a better way or thoughts on this?
Jason source
share