Skip to content

Instantly share code, notes, and snippets.

@nerestaren
Created January 3, 2018 18:11
Show Gist options
  • Save nerestaren/bef62867164fd8398d710bbe948f962b to your computer and use it in GitHub Desktop.
Save nerestaren/bef62867164fd8398d710bbe948f962b to your computer and use it in GitHub Desktop.
Select public forums
SELECT f.forum_id
FROM forums f
LEFT JOIN acl_groups ag ON ag.forum_id = f.forum_id
LEFT JOIN acl_options ao ON ag.auth_option_id = ao.auth_option_id
LEFT JOIN acl_roles_data ard ON ag.auth_role_id = ard.role_id
LEFT JOIN acl_options ao2 ON ard.auth_option_id = ao2.auth_option_id
WHERE ag.group_id = 2 AND ((ag.auth_option_id = 20 AND ag.auth_setting = 1) OR (ard.auth_option_id = 20 AND ard.auth_setting = 1))
@nerestaren
Copy link
Author

Select public forums in a phpBB board

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment