$check_ban = $db->query_first("SELECT *, COUNT(field) AS 'count FROM banlistWHERE username = " . $vbulletin->userinfo['username'] . "GROUP by field");if($check_ban['count'] > 0){//user is bannedexit;}