CDbException

CDbException

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

程序日志
时间 等级 类别 信息
19:03:43.47235 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 * FROM `project_3dmodels` `t` WHERE (0 <= :Status AND
t.Status>=0)  ORDER BY t.Views%20DESC LIMIT 18. Bound with :Status=0.
19:03:43.47352 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/CActiveRecord.php(1297):
CDbCommand->queryAll()
#2 /home/www/sites/framework/db/ar/CActiveRecord.php(1416):
CActiveRecord->query(Object(CDbCriteria), true)
#3
/home/www/sites/techbrood/protected/modules/Project/services/ThreedmodelService.php(280):
CActiveRecord->findAll(Object(CDbCriteria))
#4
/home/www/sites/techbrood/protected/modules/Project/services/ThreedmodelService.php(203):
ThreedmodelService->search(Array)
#5 /home/www/sites/techbrood/protected/base/Cms.php(182):
ThreedmodelService->searchByKeywords(Array)
#6
/home/www/sites/techbrood/protected/modules/Project/components/ThreedmodelListWidget.php(78):
Cms::service('Project/Threedm...', Array)
#7 /home/www/sites/techbrood/protected/extensions/helpers/Template.php(38):
ThreedmodelListWidget->run()
#8 /home/www/sites/techbrood/themes/techbrood/views/3dmodels.php(22):
Template::widget('MAIN_CONTENT_PR...', 'application.mod...')
#9 /home/www/sites/framework/web/CBaseController.php(126):
require('/home/www/sites...')
#10 /home/www/sites/framework/web/CBaseController.php(95):
CBaseController->renderInternal('/home/www/sites...', NULL, true)
#11 /home/www/sites/framework/web/CController.php(869):
CBaseController->renderFile('/home/www/sites...', NULL, true)
#12 /home/www/sites/framework/web/CController.php(782):
CController->renderPartial('/3dmodels', NULL, true)
#13
/home/www/sites/techbrood/protected/controllers/CmsBaseController.php(82):
CController->render('/3dmodels')
#14
/home/www/sites/techbrood/protected/controllers/DefaultController.php(40):
CmsBaseController->showTemplate()
#15 /home/www/sites/framework/web/actions/CInlineAction.php(49):
DefaultController->actionIndex()
#16 /home/www/sites/framework/web/CController.php(308):
CInlineAction->runWithParams(Array)
#17 /home/www/sites/framework/web/CController.php(286):
CController->runAction(Object(CInlineAction))
#18 /home/www/sites/framework/web/CController.php(265):
CController->runActionWithFilters(Object(CInlineAction), Array)
#19 /home/www/sites/framework/web/CWebApplication.php(282):
CController->run('index')
#20 /home/www/sites/framework/web/CWebApplication.php(141):
CWebApplication->runController('default/index')
#21 /home/www/sites/framework/base/CApplication.php(168):
CWebApplication->processRequest()
#22 /home/www/sites/techbrood/index.php(31): CApplication->run()
#23 {main}
REQUEST_URI=/3dmodels?o=t.Views%2520DESC
---