Ошибка при запросе к БД!

SQL: SELECT player_id, division_id, team_id, goals, assistent, (goals+assistent) as goalpass, games FROM football_season_player WHERE season_id= HAVING goalpass>0 ORDER BY goalpass DESC

Ошибка: 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 'HAVING goalpass>0 ORDER BY goalpass DESC' at line 1

Ошибка в '/home/sportt78/public_html/nox-system/db/noxDbQuery.class.php' в строке 134:


<?php 
   129    
//Выполняем запрос
   
130    if ($this->result $this->db->query($sql)) {
   
131    return true;
   
132    } else {
   
133    if (noxConfig::isDebug()) {
 >>
134    throw new noxException('Ошибка при запросе к БД!<br /><br />SQL: ' htmlspecialchars($sql) . '<br /><br />Ошибка: ' $this->db->error());
   
135    }
   
136    return false;
   
137    }
   
138    }
   
139    
?>

Стек вызова

#0 /home/sportt78/public_html/nox-system/db/noxDbQuery.class.php(149): noxDbQuery->exec()
#1 /home/sportt78/public_html/nox-modules/football/lib/actions/frontend/footballStatistic.actions.php(127): noxDbQuery->fetch()
#2 /home/sportt78/public_html/nox-system/action/noxThemeActions.class.php(37): footballStatisticActions->actionGolpas()
#3 /home/sportt78/public_html/nox-modules/football/lib/actions/frontend/footballStatistic.actions.php(17): noxThemeActions->execute()
#4 /home/sportt78/public_html/nox-system/action/noxThemeAction.class.php(177): footballStatisticActions->execute()
#5 /home/sportt78/public_html/nox-system/action/noxThemeActions.class.php(25): noxThemeAction->run()
#6 /home/sportt78/public_html/nox-system/application/noxApplication.class.php(282): noxThemeActions->run('Golpas')
#7 /home/sportt78/public_html/nox-system/application/noxApplication.class.php(304): noxApplication->runAction()
#8 /home/sportt78/public_html/nox-config/application.class.php(10): noxApplication->run()
#9 /home/sportt78/public_html/nox-system/noxSystem.class.php(310): application->run()
#10 /home/sportt78/public_html/index.php(17): noxSystem::run()
#11 {main}

noxSystem

Full URL: http://sport-time.ru/events/39/39a/statistic/golpas
Base URL: 
Request URL: /events/39/39a/statistic/golpas
Request Path: /events/39/39a/statistic/golpas
Module URL: /events
Action URL: /39/39a/statistic/golpas
Params: Array
(
    [get] => Array
        (
        )

    [post] => Array
        (
        )

    [requestMethod] => GET
    [ajax] => 
    [backend] => 
    [frontend] => 1
    [eventUrl] => 39
    [seasonUrl] => 39a
)

Module Folder: /home/sportt78/public_html/nox-modules/football