CDbCommand không thể thi hành câu truy vấn SQL: SQLSTATE[42000]: Syntax error or access violation: 1064 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 'AND t.active = 1 AND position=2) ORDER BY t.ord ASC, t.id ASC' at line 1. The SQL statement executed was: SELECT `t`.`id` AS `t0_c0`, `t`.`name` AS `t0_c1`, `t`.`position` AS `t0_c2`, `t`.`type` AS `t0_c3`, `t`.`link` AS `t0_c4`, `t`.`parent` AS `t0_c5`, `t`.`ord` AS `t0_c6`, `t`.`new_tab` AS `t0_c7`, `t`.`active` AS `t0_c8`, `t`.`lang_id` AS `t0_c9`, `t`.`symbol` AS `t0_c10`, `t`.`background` AS `t0_c11`, `lang`.`id` AS `t1_c0`, `lang`.`code` AS `t1_c1`, `lang`.`name` AS `t1_c2`, `lang`.`flag` AS `t1_c3`, `lang`.`ord` AS `t1_c4`, `lang`.`defa` AS `t1_c5`, `lang`.`active` AS `t1_c6` FROM `menu` `t` LEFT OUTER JOIN `languages` `lang` ON (`t`.`lang_id`=`lang`.`id`) WHERE (lang.code like "" AND t.parent = AND t.active = 1 AND position=2) ORDER BY t.ord ASC, t.id ASC (/home/catbiairport/catcanh.com/framework/db/CDbCommand.php:518)
#0 /home/catbiairport/catcanh.com/framework/db/CDbCommand.php(376): CDbCommand->queryInternal('fetchAll', Array, Array) #1 /home/catbiairport/catcanh.com/framework/db/ar/CActiveFinder.php(817): CDbCommand->queryAll() #2 /home/catbiairport/catcanh.com/framework/db/ar/CActiveFinder.php(449): CJoinElement->runQuery(Object(CJoinQuery)) #3 /home/catbiairport/catcanh.com/framework/db/ar/CActiveFinder.php(72): CJoinElement->find(Object(CDbCriteria)) #4 /home/catbiairport/catcanh.com/framework/db/ar/CActiveRecord.php(1261): CActiveFinder->query(Object(CDbCriteria), true) #5 /home/catbiairport/catcanh.com/framework/db/ar/CActiveRecord.php(1380): CActiveRecord->query(Object(CDbCriteria), true) #6 /home/catbiairport/catcanh.com/protected/components/site/CBlockMenu.php(27): CActiveRecord->findAll(Array) #7 /home/catbiairport/catcanh.com/framework/web/CBaseController.php(166): CBlockMenu->run() #8 /home/catbiairport/catcanh.com/protected/views/site/footer.php(3): CBaseController->widget('application.com...', Array) #9 /home/catbiairport/catcanh.com/framework/web/CBaseController.php(119): require('/home/catbiairp...') #10 /home/catbiairport/catcanh.com/framework/web/CBaseController.php(88): CBaseController->renderInternal('/home/catbiairp...', NULL, true) #11 /home/catbiairport/catcanh.com/framework/web/CController.php(866): CBaseController->renderFile('/home/catbiairp...', NULL, true) #12 /home/catbiairport/catcanh.com/protected/views/layouts/page.php(14): CController->renderPartial('footer') #13 /home/catbiairport/catcanh.com/framework/web/CBaseController.php(119): require('/home/catbiairp...') #14 /home/catbiairport/catcanh.com/framework/web/CBaseController.php(88): CBaseController->renderInternal('/home/catbiairp...', Array, true) #15 /home/catbiairport/catcanh.com/framework/web/CController.php(781): CBaseController->renderFile('/home/catbiairp...', Array, true) #16 /home/catbiairport/catcanh.com/protected/controllers/SiteController.php(572): CController->render('error', Array) #17 /home/catbiairport/catcanh.com/framework/web/actions/CInlineAction.php(50): SiteController->actionError() #18 /home/catbiairport/catcanh.com/framework/web/CController.php(300): CInlineAction->runWithParams(Array) #19 /home/catbiairport/catcanh.com/framework/web/CController.php(278): CController->runAction(Object(CInlineAction)) #20 /home/catbiairport/catcanh.com/framework/web/CController.php(257): CController->runActionWithFilters(Object(CInlineAction), Array) #21 /home/catbiairport/catcanh.com/framework/web/CWebApplication.php(328): CController->run('error') #22 /home/catbiairport/catcanh.com/framework/base/CErrorHandler.php(279): CWebApplication->runController('site/error') #23 /home/catbiairport/catcanh.com/framework/base/CErrorHandler.php(178): CErrorHandler->render('error', Array) #24 /home/catbiairport/catcanh.com/framework/base/CErrorHandler.php(103): CErrorHandler->handleException(Object(CHttpException)) #25 /home/catbiairport/catcanh.com/framework/base/CApplication.php(631): CErrorHandler->handle(Object(CExceptionEvent)) #26 [internal function]: CApplication->handleException(Object(CHttpException)) #27 {main}