CDbException

CDbException

CDbCommand 无法执行 SQL 语句: SQLSTATE[42S22]: Column not found: 1054 Unknown column '20DESC' in 'order clause'

程序日志
时间 等级 类别 信息
12:31:35.163659 error system.db.CDbCommand
CDbCommand::fetchAll() failed: SQLSTATE[42S22]: Column not found: 1054
Unknown column '20DESC' in 'order clause'. The SQL statement executed was:
SELECT DISTINCT `t`.`Id` AS `t0_c0`, `t`.`UserId` AS `t0_c1`, `t`.`Type` AS
`t0_c2`, `t`.`Title` AS `t0_c3`, `t`.`TitleTranslated` AS `t0_c4`,
`t`.`Alias` AS `t0_c5`, `t`.`Description` AS `t0_c6`, `t`.`DesTranslated`
AS `t0_c7`, `t`.`Tags` AS `t0_c8`, `t`.`IsFeatured` AS `t0_c9`,
`t`.`ReferrerUrl` AS `t0_c10`, `t`.`ReferrerName` AS `t0_c11`, `t`.`Status`
AS `t0_c12`, `t`.`Created` AS `t0_c13`, `t`.`Updated` AS `t0_c14`,
`t`.`Views` AS `t0_c15`, `t`.`Exposures` AS `t0_c16`, `t`.`Shares` AS
`t0_c17`, `t`.`Comments` AS `t0_c18`, `t`.`Useful` AS `t0_c19`,
`t`.`Unuseful` AS `t0_c20`, `t`.`c_year` AS `t0_c21`, `t`.`c_month` AS
`t0_c22`, `Translation`.`Title` AS `t1_c1`, `Translation`.`Description` AS
`t1_c3`, `Translation`.`Locale` AS `t1_c5`, `Translation`.`TranslatedId` AS
`t1_c4` FROM `news_briefs` `t`  LEFT JOIN `news_briefs_translated`
`Translation` ON (`Translation`.`Id`=`t`.`Id`)  WHERE (t.Type != 'selfhelp'
AND t.Status>=0 AND t.id IN
(26732,39141,170843,173028,174091,175039,180116,32446,84429,40915,281,13239,19415,21006,21007,21461,22015,24135,35451,36882,41637,46103,55409,68826,119,279,23864,27333,56988,58548,75068,78225,14545,55414,61344,87588,97046,101852,217,305,3221,6703,11789,13240,13241,16305,16308,17839,19423,21008,22502,25731,28906,28942,30586,30592,33994,35064,35456,36881,36884,36885,38289,39882,44695,44699,46104,47696,51044,53983,56985,57857,58549,59992,62722,62727,64262,67195,68824,70339,70343,70344,75064,76598,79852,81372,82814,82816,87587,87589,89497,89500,94675,94677,98634,98636,100220,101855,106661,218,18764,30875,31949,56987,132,138,221,223,260,3216,3220,8757,8758,8760,8762,8766,8767,11791,11793,11796,11798,13237,14301,14747,14751,14752,14753,17832,17833,17834,20757,22507,24133,24137,25728,25734,27324,28941,33988,33992,37449,38286,38288,39632,39755,39880,41633,43183,43184,44700))
ORDER BY Views%20DESC LIMIT 16.
12:31:35.165258 error exception.CDbException
CDbException: CDbCommand 无法执行 SQL 语句: SQLSTATE[42S22]: Column
not found: 1054 Unknown column '20DESC' in 'order clause' in
/home/www/sites/framework/db/CDbCommand.php:541
Stack trace:
#0 /home/www/sites/framework/db/CDbCommand.php(395):
CDbCommand->queryInternal('fetchAll', Array, Array)
#1 /home/www/sites/framework/db/ar/CActiveFinder.php(761):
CDbCommand->queryAll()
#2 /home/www/sites/framework/db/ar/CActiveFinder.php(422):
CJoinElement->runQuery(Object(CJoinQuery))
#3 /home/www/sites/framework/db/ar/CActiveFinder.php(68):
CJoinElement->find(Object(CDbCriteria))
#4 /home/www/sites/framework/db/ar/CActiveRecord.php(1302):
CActiveFinder->query(Object(CDbCriteria), true)
#5 /home/www/sites/framework/db/ar/CActiveRecord.php(1416):
CActiveRecord->query(Object(CDbCriteria), true)
#6
/home/www/sites/techbrood/protected/modules/News/services/NewsBriefService.php(273):
CActiveRecord->findAll(Object(CDbCriteria))
#7
/home/www/sites/techbrood/protected/modules/News/services/NewsBriefService.php(226):
NewsBriefService->searchWithSphinx(Array)
#8 /home/www/sites/techbrood/protected/base/Cms.php(182):
NewsBriefService->searchByKeywords(Array)
#9
/home/www/sites/techbrood/protected/modules/News/components/BriefListWidget.php(17):
Cms::service('News/NewsBrief/...', Array)
#10
/home/www/sites/techbrood/protected/extensions/helpers/Template.php(38):
BriefListWidget->run()
#11 /home/www/sites/techbrood/themes/techbrood/views/briefs.php(23):
Template::widget('MAIN_CONTENT_BR...', 'application.mod...')
#12 /home/www/sites/framework/web/CBaseController.php(126):
require('/home/www/sites...')
#13 /home/www/sites/framework/web/CBaseController.php(95):
CBaseController->renderInternal('/home/www/sites...', NULL, true)
#14 /home/www/sites/framework/web/CController.php(869):
CBaseController->renderFile('/home/www/sites...', NULL, true)
#15 /home/www/sites/framework/web/CController.php(782):
CController->renderPartial('/briefs', NULL, true)
#16
/home/www/sites/techbrood/protected/controllers/CmsBaseController.php(82):
CController->render('/briefs')
#17
/home/www/sites/techbrood/protected/controllers/DefaultController.php(40):
CmsBaseController->showTemplate()
#18 /home/www/sites/framework/web/actions/CInlineAction.php(49):
DefaultController->actionIndex()
#19 /home/www/sites/framework/web/CController.php(308):
CInlineAction->runWithParams(Array)
#20 /home/www/sites/framework/web/CController.php(286):
CController->runAction(Object(CInlineAction))
#21 /home/www/sites/framework/web/CController.php(265):
CController->runActionWithFilters(Object(CInlineAction), Array)
#22 /home/www/sites/framework/web/CWebApplication.php(282):
CController->run('index')
#23 /home/www/sites/framework/web/CWebApplication.php(141):
CWebApplication->runController('default/index')
#24 /home/www/sites/framework/base/CApplication.php(168):
CWebApplication->processRequest()
#25 /home/www/sites/techbrood/index.php(31): CApplication->run()
#26 {main}
REQUEST_URI=/briefs?q=javascript&o=Views%2520DESC
HTTP_REFERER=http://techbrood.com/briefs?q=javascript&o=Views%2520DESC
---