I have a table setup strictly for user permissions (or roles, if you will) that will determine specific features within a comment system. I’m not particularly sure how I should setup the columns, however. For example, should I apply the user roles with numeric values or a string?
// Admin
role = 1
// User
role = 2
Banned
role = 3
// OR (self explanatory)
role = 'admin'
role = 'user'
role = 'banned'
Therefore, I could do something like:
switch ($permission) {
case 'admin':
$role = 'admin';
break;
case 'banned':
$role = 'banned';
break;
default 'user':
$role = 'user';
break;
}
`