I have two tables (users and permissions). How can I check whether a user has pemission? in this case permission for editing topics
1 is the admin account
TABLES: users (id, username, acc_type) (1, mirso, 1)
permissions (id, name, description, acc_type, permission_key) (1, Topic edit, some text, 1, edit_topic)