Error Number: 1064
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 'ASC' at line 1
SELECT t1.afl_tbl_pkid,t1.rank,t1.club_name,t1.resultstable_type as t1rt_type,t2.resultstable_type as t2rt_type,t3.resultstable_type as t3rt_type,t1.matches_total as t1m_total,t2.matches_total as t2m_total,t3.matches_total as t3m_total,t1.matches_won as t1m_won,t2.matches_won as t2m_won,t3.matches_won as t3m_won,t1.matches_lost as t1m_lost,t2.matches_lost as t2m_lost,t3.matches_lost as t3m_lost,t1.matches_draw as t1m_draw,t2.matches_draw as t2m_draw,t3.matches_draw as t3m_draw,t1.score_pro as t1g_pro,t2.score_pro as t2g_pro,t3.score_pro as t3g_pro,t1.score_against as t1g_against,t2.score_against as t2g_against,t3.score_against as t3g_against,t1.points FROM sss_afl_get_tables AS t1 LEFT JOIN sss_afl_get_tables AS t2 ON t2.team_id = t1.team_id LEFT JOIN sss_afl_get_tables AS t3 ON t3.team_id = t1.team_id WHERE t1.resultstable_type = "total" AND t2.resultstable_type = "home" AND t3.resultstable_type = "away" and t1.season_id=54 GROUP BY t1.rank ASC
Filename: models/Afl_model.php
Line Number: 539