Skip to content

Instantly share code, notes, and snippets.

@iovino
Created December 5, 2011 23:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save iovino/1435830 to your computer and use it in GitHub Desktop.
Save iovino/1435830 to your computer and use it in GitHub Desktop.
Checks to see if a user is banned or not
SELECT user.username,
IF(usergroup.genericoptions & 32, 0, 1) AS is_banned
FROM user as user
INNER
JOIN usergroup AS usergroup
ON usergroup.usergroupid = user.usergroupid
WHERE userid = 1;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment