Error in SQL

The response from the server MySQL: 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 '>= first AND <= last' at line 1

в /home/wwwroot/bt.ourdisc.net/include/functions.php, line 126

Запрос номер 1.