/home/tonthanhhuyen/public_html/framework/db/CDbCommand.php(543)
531 { 532 if($this->_connection->enableProfiling) 533 Yii::endProfile('system.db.CDbCommand.query('.$this->getText().$par.')','system.db.CDbCommand.query'); 534 535 $errorInfo=$e instanceof PDOException ? $e->errorInfo : null; 536 $message=$e->getMessage(); 537 Yii::log(Yii::t('yii','CDbCommand::{method}() failed: {error}. The SQL statement executed was: {sql}.', 538 array('{method}'=>$method, '{error}'=>$message, '{sql}'=>$this->getText().$par)),CLogger::LEVEL_ERROR,'system.db.CDbCommand'); 539 540 if(YII_DEBUG) 541 $message.='. The SQL statement executed was: '.$this->getText().$par; 542 543 throw new CDbException(Yii::t('yii','CDbCommand failed to execute the SQL statement: {error}', 544 array('{error}'=>$message)),(int)$e->getCode(),$errorInfo); 545 } 546 } 547 548 /** 549 * Builds a SQL SELECT statement from the given query specification. 550 * @param array $query the query specification in name-value pairs. The following 551 * query options are supported: {@link select}, {@link distinct}, {@link from}, 552 * {@link where}, {@link join}, {@link group}, {@link having}, {@link order}, 553 * {@link limit}, {@link offset} and {@link union}. 554 * @throws CDbException if "from" key is not present in given query parameter 555 * @return string the SQL statement
#0 |
+
–
/home/tonthanhhuyen/public_html/framework/db/CDbCommand.php(433): CDbCommand->queryInternal("fetchColumn", 0, array()) 428 * @return mixed the value of the first column in the first row of the query result. False is returned if there is no value. 429 * @throws CException execution failed 430 */ 431 public function queryScalar($params=array()) 432 { 433 $result=$this->queryInternal('fetchColumn',0,$params); 434 if(is_resource($result) && get_resource_type($result)==='stream') 435 return stream_get_contents($result); 436 else 437 return $result; 438 } |
#1 |
+
–
/home/tonthanhhuyen/public_html/framework/db/ar/CActiveRecord.php(1601): CDbCommand->queryScalar() 1596 $this->beforeCount(); 1597 $criteria=$builder->createCriteria($condition,$params); 1598 $this->applyScopes($criteria); 1599 1600 if(empty($criteria->with)) 1601 return $builder->createCountCommand($this->getTableSchema(),$criteria)->queryScalar(); 1602 else 1603 { 1604 $finder=$this->getActiveFinder($criteria->with); 1605 return $finder->count($criteria); 1606 } |
#2 |
+
–
/home/tonthanhhuyen/public_html/protected/modules/products/models/Products.php(258): CActiveRecord->count(CDbCriteria) 253 $criteria->order = 'record_order DESC, postdate DESC'; 254 $criteria->condition = 'enable=1 AND hoiit_module_item_cat_cat_id IN('.$cid.$data.$data_sub.')'; 255 //$criteria->condition = 'enable=1 AND hoiit_module_item_cat_cat_id=:cid'; 256 //$criteria->params = array(':cid' => $cid); 257 258 $count = $this->count($criteria); 259 260 // elements per page 261 $pages = new CPagination($count); 262 $pages->pageSize = Config::getValue('products_num_item_cat'); 263 $pages->applyLimit($criteria); |
#3 |
+
–
/home/tonthanhhuyen/public_html/protected/modules/products/controllers/DefaultController.php(25): Products->listItemByCat(null) 20 $model = new $model_class; 21 $model_cat = new $model_cat_class; 22 $model_cat_lang = new $model_cat_lang_class; 23 24 $info_cat = $model_cat_lang->findCatByTag($cid); 25 $this->render('cats', array('info_cat' => $info_cat, 'sub_cats' => $model_cat->listItem($info_cat['cat_id']), 'items' => $model->listItemByCat($info_cat['cat_id']))); 26 } 27 28 public function actionTag($tag) { 29 $this->setLayout(); 30 $model_class = ucfirst($this->module->id); |
#4 |
unknown(0): DefaultController->actionCats("chen-inox-cao-cap", 0)
|
#5 |
+
–
/home/tonthanhhuyen/public_html/framework/web/actions/CAction.php(108): ReflectionMethod->invokeArgs(DefaultController, array("chen-inox-cao-cap", 0)) 103 elseif($param->isDefaultValueAvailable()) 104 $ps[]=$param->getDefaultValue(); 105 else 106 return false; 107 } 108 $method->invokeArgs($object,$ps); 109 return true; 110 } 111 } |
#6 |
+
–
/home/tonthanhhuyen/public_html/framework/web/actions/CInlineAction.php(47): CAction->runWithParamsInternal(DefaultController, ReflectionMethod, array("lang" => "en", "products" => "products", "cid" => "chen-inox-cao-cap")) 42 { 43 $methodName='action'.$this->getId(); 44 $controller=$this->getController(); 45 $method=new ReflectionMethod($controller, $methodName); 46 if($method->getNumberOfParameters()>0) 47 return $this->runWithParamsInternal($controller, $method, $params); 48 else 49 return $controller->$methodName(); 50 } 51 52 } |
#7 |
+
–
/home/tonthanhhuyen/public_html/framework/web/CController.php(308): CInlineAction->runWithParams(array("lang" => "en", "products" => "products", "cid" => "chen-inox-cao-cap")) 303 { 304 $priorAction=$this->_action; 305 $this->_action=$action; 306 if($this->beforeAction($action)) 307 { 308 if($action->runWithParams($this->getActionParams())===false) 309 $this->invalidActionParams($action); 310 else 311 $this->afterAction($action); 312 } 313 $this->_action=$priorAction; |
#8 |
+
–
/home/tonthanhhuyen/public_html/framework/web/CController.php(286): CController->runAction(CInlineAction) 281 * @see runAction 282 */ 283 public function runActionWithFilters($action,$filters) 284 { 285 if(empty($filters)) 286 $this->runAction($action); 287 else 288 { 289 $priorAction=$this->_action; 290 $this->_action=$action; 291 CFilterChain::create($this,$action,$filters)->run(); |
#9 |
+
–
/home/tonthanhhuyen/public_html/framework/web/CController.php(265): CController->runActionWithFilters(CInlineAction, array()) 260 { 261 if(($parent=$this->getModule())===null) 262 $parent=Yii::app(); 263 if($parent->beforeControllerAction($this,$action)) 264 { 265 $this->runActionWithFilters($action,$this->filters()); 266 $parent->afterControllerAction($this,$action); 267 } 268 } 269 else 270 $this->missingAction($actionID); |
#10 |
+
–
/home/tonthanhhuyen/public_html/framework/web/CWebApplication.php(282): CController->run("cats") 277 { 278 list($controller,$actionID)=$ca; 279 $oldController=$this->_controller; 280 $this->_controller=$controller; 281 $controller->init(); 282 $controller->run($actionID); 283 $this->_controller=$oldController; 284 } 285 else 286 throw new CHttpException(404,Yii::t('yii','Unable to resolve the request "{route}".', 287 array('{route}'=>$route===''?$this->defaultController:$route))); |
#11 |
+
–
/home/tonthanhhuyen/public_html/framework/web/CWebApplication.php(141): CWebApplication->runController("products/default/cats") 136 foreach(array_splice($this->catchAllRequest,1) as $name=>$value) 137 $_GET[$name]=$value; 138 } 139 else 140 $route=$this->getUrlManager()->parseUrl($this->getRequest()); 141 $this->runController($route); 142 } 143 144 /** 145 * Registers the core application components. 146 * This method overrides the parent implementation by registering additional core components. |
#12 |
+
–
/home/tonthanhhuyen/public_html/framework/base/CApplication.php(180): CWebApplication->processRequest() 175 public function run() 176 { 177 if($this->hasEventHandler('onBeginRequest')) 178 $this->onBeginRequest(new CEvent($this)); 179 register_shutdown_function(array($this,'end'),0,false); 180 $this->processRequest(); 181 if($this->hasEventHandler('onEndRequest')) 182 $this->onEndRequest(new CEvent($this)); 183 } 184 185 /** |
#13 |
+
–
/home/tonthanhhuyen/public_html/index.php(11): CApplication->run() 06 defined('YII_DEBUG') or define('YII_DEBUG', true); 07 // specify how many levels of call stack should be shown in each log message 08 defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL', 3); 09 10 require_once('framework/yii.php'); 11 Yii::createWebApplication($config)->run(); |