DBException

Description

Cannot execute query:
SELECT news0.news_id AS newsId0,
news0.date_create AS dateCreate1,
news0.title AS title2,
news0.short_description AS shortDescription3,
news0.description AS description4
FROM news AS news0
ORDER BY news0.date_create DESC
LIMIT -1, 10

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 '-1, 10' at line 8

Source File

/home/u372758/hotel-novinka.ru/www/protected/extensions/phasis/db/impl/mysql/MySQLQuery.php(97)

00085:     {
00086:         $this->_ValidateConnection();
00087:                 
00088:         
00089:         $sql = $this->_SetSQLParameters( $this->sql );
00090:         
00091:         self::LOG()->info( "Executing query: " . $this->sql );
00092:         
00093:         $resultSet = $this->connection->sendSQL( $sql );
00094:         
00095:         if ( !$resultSet )
00096:         {
00097: throw new DBException( "Cannot execute query: " . $this->sql . "\n\n" . $this->connection->getErrorDescription() );
00098: } 00099: 00100: $results = new ArrayIterator(); 00101: while ( $row = mysql_fetch_assoc( $resultSet ) ) 00102: { 00103: $results->append( $row ); 00104: } 00105: 00106: self::LOG()->info( "Count results fetch: " . $results->count() ); 00107: 00108: return $results; 00109: }

Stack Trace

#0 /home/u372758/hotel-novinka.ru/www/protected/extensions/phasis/orm/Criteria.php(117): MySQLQuery->getAllResults()
#1 /home/u372758/hotel-novinka.ru/www/protected/models/translation/orm/TranslationMySQLCriteria.php(8): Criteria->fetchList()
#2 /home/u372758/hotel-novinka.ru/www/protected/models/dao/impl/NewsHome.php(12): TranslationMySQLCriteria->fetchList()
#3 /home/u372758/hotel-novinka.ru/www/protected/models/facade/impl/NewsFacadeImpl.php(38): NewsHome->getNews(-1, '10')
#4 /home/u372758/hotel-novinka.ru/www/protected/controllers/SiteController.php(273): NewsFacadeImpl->getNews(-1, '10')
#5 /home/u372758/hotel-novinka.ru/yii/framework/yii.php(3092): SiteController->actionNews()
#6 /home/u372758/hotel-novinka.ru/yii/framework/yii.php(2716): CInlineAction->run()
#7 /home/u372758/hotel-novinka.ru/yii/framework/yii.php(2701): CController->runAction(Object(CInlineAction))
#8 /home/u372758/hotel-novinka.ru/yii/framework/yii.php(2691): CController->runActionWithFilters(Object(CInlineAction), Array)
#9 /home/u372758/hotel-novinka.ru/yii/framework/yii.php(1387): CController->run('news')
#10 /home/u372758/hotel-novinka.ru/yii/framework/yii.php(1272): CWebApplication->runController('site/news')
#11 /home/u372758/hotel-novinka.ru/yii/framework/yii.php(945): CWebApplication->processRequest()
#12 /home/u372758/hotel-novinka.ru/www/index.php(19): CApplication->run()
#13 {main}
2024-03-29 12:33:29 Apache Yii Framework/1.0.7