Server Live View
 Name  Map  Played  Players  Kills  Headshots  Hpk
(Join) 00:00:00 / 0 0 0.0000
 # Player  Kills  Hs  HS:K  Acc  Lat  Time  +/-  Skill
ERROR
Database Error

Server Address: localhost
Server Username: hlxuser

Error Diagnostic:
Bad query.

Server Error: (1064) You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'AND connected > 0 GROUP BY team ORDER BY team...' at line 15

Last SQL Query:
            SELECT 
                team, name, teamkills, teamdeaths, teamheadshots, teamping, teamskill,
                teamshots, teamhits, teamjointime,
                IFNULL(playerlist_bgcolor, '#D5D5D5') AS playerlist_bgcolor,
                IFNULL(playerlist_color, '#050505') AS playerlist_color,
                IFNULL(playerlist_index, 99) AS playerlist_index
            FROM hlstats_Teams
            RIGHT JOIN (
                SELECT 
                    team, SUM(kills) AS teamkills, SUM(deaths) AS teamdeaths,
                    SUM(headshots) AS teamheadshots, AVG(ping/2) AS teamping,
                    AVG(skill) AS teamskill, SUM(shots) AS teamshots,
                    SUM(hits) AS teamhits, SUM(UNIX_TIMESTAMP(NOW()) - connected) AS teamjointime
                FROM hlstats_Livestats
                WHERE server_id =  AND connected > 0
                GROUP BY team
                ORDER BY teamkills DESC
            ) AS teaminfo
            ON code = team AND hlstats_Teams.game = ''
            ORDER BY playerlist_index
            LIMIT 0, 30