MassHSHockey.com
    
SQL/DB Error -- [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 . SELECT division_season.id, divisions.* FROM divisions INNER JOIN division_season ON division_season.division_id = divisions.id WHERE division_season.id = ]
SELECT *, division_season.id as division_season_id FROM divisions INNER JOIN division_season ON division_season.division_id = divisions.id WHERE status = 1 AND gender = 'M' AND division_season.reg_event_id=7 order by gender DESC, long_name
SQL/DB Error -- [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND league_wins+league_losses+league_ties + overall_wins + overall_losses + over' at line 78 . SELECT team_id, team_season_id, division_season_id, team_name_long, division_id, division_section_id, league_id, SUM(league_wins) as league_wins, SUM(league_losses) as league_losses, SUM(league_ties) as league_ties, SUM(league_goals_for) as league_goals_for, SUM(league_goals_against) as league_goals_against, 2 * SUM(league_wins) + SUM(league_ties) as league_points, SUM(overall_wins) as overall_wins, SUM(overall_losses) as overall_losses, SUM(overall_ties) as overall_ties, SUM(overall_goals_for) as overall_goals_for, SUM(overall_goals_against) as overall_goals_against, 2 * SUM(overall_wins) + SUM(overall_ties) as overall_points, ROUND(IFNULL( (2 * SUM(overall_wins) + SUM(overall_ties) ) / (2 * SUM(overall_wins) + 2 * SUM(overall_losses) + 2 * SUM(overall_ties)),'0.00'),3) as win_pct FROM ( SELECT teams.team_id, team_season.id as team_season_id, team_season.division_season_id, team_season.name as team_name_long,division_id,division_section_id,teams.league_id, if( result_home_score > result_visit_score AND ( ( (select league_id from teams where team_id = home_id) = (select league_id from teams where team_id = visit_id) AND do_not_include_in_league_record = 0 ) OR include_in_league_record = 1), 1, 0 ) as league_wins, if( result_home_score < result_visit_score AND ( ( (select league_id from teams where team_id = home_id) = (select league_id from teams where team_id = visit_id) AND do_not_include_in_league_record = 0 ) OR include_in_league_record = 1), 1, 0 ) as league_losses, if( result_home_score = result_visit_score AND ( ( (select league_id from teams where team_id = home_id) = (select league_id from teams where team_id = visit_id) AND do_not_include_in_league_record = 0 ) OR include_in_league_record = 1), 1, 0 ) as league_ties, if( ( (select league_id from teams where team_id = home_id) = (select league_id from teams where team_id = visit_id) AND do_not_include_in_league_record = 0 ) OR include_in_league_record = 1, result_home_score, 0 ) as league_goals_for, if( ( (select league_id from teams where team_id = home_id) = (select league_id from teams where team_id = visit_id) AND do_not_include_in_league_record = 0 ) OR include_in_league_record = 1, result_visit_score, 0 ) as league_goals_against, if( result_home_score > result_visit_score, 1, 0 ) as overall_wins, if( result_home_score < result_visit_score, 1, 0 ) as overall_losses, if( result_home_score = result_visit_score, 1, 0 ) as overall_ties, IFNULL(result_home_score, 0) as overall_goals_for, IFNULL(result_visit_score, 0) as overall_goals_against FROM teams INNER JOIN team_season ON team_season.team_id = teams.team_id LEFT JOIN (select * from event_mgr where status = 1 and end_time < UNIX_TIMESTAMP(now()) AND season_id = 7 AND do_not_include_in_record = 0) games ON teams.team_id = games.home_id WHERE team_season.reg_event_id = 7 UNION ALL SELECT teams.team_id, team_season.id as team_season_id , team_season.division_season_id,team_season.name as team_name_long,division_id,division_section_id,teams.league_id, if( result_visit_score > result_home_score AND ( ( (select league_id from teams where team_id = visit_id) = (select league_id from teams where team_id = home_id) AND do_not_include_in_league_record = 0) OR include_in_league_record = 1), 1, 0 ) as league_wins, if( result_visit_score < result_home_score AND ( ( (select league_id from teams where team_id = visit_id) = (select league_id from teams where team_id = home_id) AND do_not_include_in_league_record = 0) OR include_in_league_record = 1), 1, 0 ) as league_losses, if( result_visit_score = result_home_score AND ( ( (select league_id from teams where team_id = visit_id) = (select league_id from teams where team_id = home_id) AND do_not_include_in_league_record = 0) OR include_in_league_record = 1), 1, 0 ) as league_ties, if( ( (select league_id from teams where team_id = home_id) = (select league_id from teams where team_id = visit_id) AND do_not_include_in_league_record = 0) OR include_in_league_record = 1, result_visit_score, 0 ) as league_goals_for, if( ( (select league_id from teams where team_id = home_id) = (select league_id from teams where team_id = visit_id) AND do_not_include_in_league_record = 0) OR include_in_league_record = 1, result_home_score, 0 ) as league_goals_against, if( result_visit_score > result_home_score, 1, 0 ) as overall_wins, if( result_visit_score < result_home_score, 1, 0 ) as overall_losses, if( result_visit_score = result_home_score, 1, 0 ) as overall_ties, IFNULL(result_visit_score, 0) as overall_goals_for, IFNULL(result_home_score, 0) as overall_goals_against FROM teams INNER JOIN team_season ON team_season.team_id = teams.team_id LEFT JOIN (select * from event_mgr where status = 1 and end_time < UNIX_TIMESTAMP(now()) AND season_id = 7 AND do_not_include_in_record = 0) games ON teams.team_id = games.visit_id WHERE team_season.reg_event_id = 7 ) data WHERE division_season_id = AND league_wins+league_losses+league_ties + overall_wins + overall_losses + overall_ties>0 GROUP BY team_id, team_name_long ORDER BY win_pct DESC, overall_points DESC ]

Mens

Records
Overall
TEAM WON LOST TIED GF GA PTS Win%

 

Copyright © 2015 MassHSHockey.com LLC All rights reserved.