/home/cokhithaian/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/cokhithaian/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/cokhithaian/public_html/framework/db/ar/CActiveFinder.php(759): CDbCommand->queryScalar() 754 else 755 $query->selects=array("COUNT(*)"); 756 757 $query->orders=$query->groups=$query->havings=array(); 758 $command=$query->createCommand($this->_builder); 759 return $command->queryScalar(); 760 } 761 } 762 763 /** 764 * Calls {@link CActiveRecord::afterFind} of all the records. |
#2 |
+
–
/home/cokhithaian/public_html/framework/db/ar/CActiveFinder.php(151): CJoinElement->count(CDbCriteria) 146 147 $alias=$criteria->alias===null ? 't' : $criteria->alias; 148 $this->_joinTree->tableAlias=$alias; 149 $this->_joinTree->rawTableAlias=$this->_builder->getSchema()->quoteTableName($alias); 150 151 $n=$this->_joinTree->count($criteria); 152 $this->destroyJoinTree(); 153 return $n; 154 } 155 156 /** |
#3 |
+
–
/home/cokhithaian/public_html/framework/db/ar/CActiveRecord.php(1605): CActiveFinder->count(CDbCriteria) 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 } 1607 } 1608 1609 /** 1610 * Finds the number of rows that have the specified attribute values. |
#4 |
+
–
/home/cokhithaian/public_html/protected/modules/products/models/Products.php(277): CActiveRecord->count(CDbCriteria) 272 $criteria = new CDbCriteria(); 273 $criteria->with = array(__CLASS__ . 'Cat'); 274 $criteria->order = 'record_order DESC, postdate DESC'; 275 $criteria->condition = 'enable=1 AND record_id IN('.$list_record_id.')'; 276 //$criteria->params = array(':record_id' => $list_record_id); 277 $count = $this->count($criteria); 278 279 // elements per page 280 $pages = new CPagination($count); 281 $pages->pageSize = Config::getValue('products_num_item_cat'); 282 $pages->applyLimit($criteria); |
#5 |
+
–
/home/cokhithaian/public_html/protected/modules/products/controllers/DefaultController.php(33): Products->listItemByTag("thi-cong-cong-sat-dep-tai-ba-ria") 28 public function actionTag($tag) { 29 $this->setLayout(); 30 $model_class = ucfirst($this->module->id); 31 $model = new $model_class(); 32 33 $this->render('tag', array('tag_info' => Tags::model()->tagInfo($tag),'items' => $model->listItemByTag($tag))); 34 } 35 36 public function actionView($id) { 37 $this->setLayout(); 38 $model_class = ucfirst($this->module->id); |
#6 |
unknown(0): DefaultController->actionTag("thi-cong-cong-sat-dep-tai-ba-ria")
|
#7 |
+
–
/home/cokhithaian/public_html/framework/web/actions/CAction.php(108): ReflectionMethod->invokeArgs(DefaultController, array("thi-cong-cong-sat-dep-tai-ba-ria")) 103 elseif($param->isDefaultValueAvailable()) 104 $ps[]=$param->getDefaultValue(); 105 else 106 return false; 107 } 108 $method->invokeArgs($object,$ps); 109 return true; 110 } 111 } |
#8 |
+
–
/home/cokhithaian/public_html/framework/web/actions/CInlineAction.php(47): CAction->runWithParamsInternal(DefaultController, ReflectionMethod, array("products" => "san-pham", "tag" => "thi-cong-cong-sat-dep-tai-ba-ria")) 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 } |
#9 |
+
–
/home/cokhithaian/public_html/framework/web/CController.php(308): CInlineAction->runWithParams(array("products" => "san-pham", "tag" => "thi-cong-cong-sat-dep-tai-ba-ria")) 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; |
#10 |
+
–
/home/cokhithaian/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(); |
#11 |
+
–
/home/cokhithaian/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); |
#12 |
+
–
/home/cokhithaian/public_html/framework/web/CWebApplication.php(282): CController->run("tag") 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))); |
#13 |
+
–
/home/cokhithaian/public_html/framework/web/CWebApplication.php(141): CWebApplication->runController("products/default/tag") 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. |
#14 |
+
–
/home/cokhithaian/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 /** |
#15 |
+
–
/home/cokhithaian/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(); |