Tabbing and quotations are incorrect - see http://area51.phpbb.com/phpBB/docs/coding-guidelines.html#sql. The user_type check should be done first and use `$db->sql_in_set()`. The LIKE statement contains a SQL injection. -you should be using `$db->sql_like_expression()`. Proper format:

		$sql = 'SELECT username, user_id
			FROM ' . USERS_TABLE . '
			WHERE ' . $db->sql_in_set('user_type', array(USER_NORMAL, USER_FOUNDER)) . '
				AND username ' . $db->sql_like_expression($q . $db->any_char);