/home/zakonbase/zakonbase.ru/yii/yiilite.php(8683)
8671 return $result; 8672 } 8673 catch(Exception $e) 8674 { 8675 if($this->_connection->enableProfiling) 8676 Yii::endProfile('system.db.CDbCommand.query('.$this->getText().$par.')','system.db.CDbCommand.query'); 8677 $errorInfo = $e instanceof PDOException ? $e->errorInfo : null; 8678 $message = $e->getMessage(); 8679 Yii::log(Yii::t('yii','CDbCommand::{method}() failed: {error}. The SQL statement executed was: {sql}.', 8680 array('{method}'=>$method, '{error}'=>$message, '{sql}'=>$this->getText().$par)),CLogger::LEVEL_ERROR,'system.db.CDbCommand'); 8681 if(YII_DEBUG) 8682 $message .= '. The SQL statement executed was: '.$this->getText().$par; 8683 throw new CDbException(Yii::t('yii','CDbCommand failed to execute the SQL statement: {error}', 8684 array('{error}'=>$message)),(int)$e->getCode(),$errorInfo); 8685 } 8686 } 8687 public function buildQuery($query) 8688 { 8689 $sql=isset($query['distinct']) && $query['distinct'] ? 'SELECT DISTINCT' : 'SELECT'; 8690 $sql.=' '.(isset($query['select']) ? $query['select'] : '*'); 8691 if(isset($query['from'])) 8692 $sql.="\nFROM ".$query['from']; 8693 else 8694 throw new CDbException(Yii::t('yii','The DB query must contain the "from" portion.')); 8695 if(isset($query['join']))
#0 |
+
–
/home/zakonbase/zakonbase.ru/yii/yiilite.php(8611): CDbCommand->queryInternal("fetch", array(2), array()) 8606 { 8607 return $this->queryInternal('fetchAll',$fetchAssociative ? $this->_fetchMode : PDO::FETCH_NUM, $params); 8608 } 8609 public function queryRow($fetchAssociative=true,$params=array()) 8610 { 8611 return $this->queryInternal('fetch',$fetchAssociative ? $this->_fetchMode : PDO::FETCH_NUM, $params); 8612 } 8613 public function queryScalar($params=array()) 8614 { 8615 $result=$this->queryInternal('fetchColumn',0,$params); 8616 if(is_resource($result) && get_resource_type($result)==='stream') |
#1 |
+
–
/home/zakonbase/zakonbase.ru/yii/yiilite.php(7217): CDbCommand->queryRow() 7212 if(empty($criteria->with)) 7213 { 7214 if(!$all) 7215 $criteria->limit=1; 7216 $command=$this->getCommandBuilder()->createFindCommand($this->getTableSchema(),$criteria); 7217 return $all ? $this->populateRecords($command->queryAll(), true, $criteria->index) : $this->populateRecord($command->queryRow()); 7218 } 7219 else 7220 { 7221 $finder=new CActiveFinder($this,$criteria->with); 7222 return $finder->query($criteria,$all); |
#2 |
+
–
/home/zakonbase/zakonbase.ru/yii/yiilite.php(7281): CActiveRecord->query(CDbCriteria) 7276 $this->_alias=$alias; 7277 } 7278 public function find($condition='',$params=array()) 7279 { 7280 $criteria=$this->getCommandBuilder()->createCriteria($condition,$params); 7281 return $this->query($criteria); 7282 } 7283 public function findAll($condition='',$params=array()) 7284 { 7285 $criteria=$this->getCommandBuilder()->createCriteria($condition,$params); 7286 return $this->query($criteria,true); |
#3 |
+
–
/home/zakonbase/zakonbase.ru/protected/controllers/NewsController.php(13): CActiveRecord->find("news_id='all' AND news_t_id='1'") 08 $sNewsUrl = Yii::app()->getRequest()->getQuery('var2'); 09 10 $oNewsType = NewsType::model()->find('news_t_url=\'' . $sNewsTypeUrl . '\''); 11 $oNews = News::model()->find('news_url=\'' . $sNewsUrl . '\' AND news_t_id=\'' . $oNewsType->news_t_id . '\''); 12 if (!$oNews) { 13 $oNews = News::model()->find('news_id=\'' . $sNewsUrl . '\' AND news_t_id=\'' . $oNewsType->news_t_id . '\''); 14 } 15 $this->pageTitle = $oNews->news_title; 16 $oNews->news_count+=1; 17 $oNews->save(); 18 $oNewsNext = News::model()->find('news_id > \'' . $oNews->news_id . '\' AND news_t_id=' . $oNewsType->news_t_id . ' ORDER BY news_id'); |
#4 |
+
–
/home/zakonbase/zakonbase.ru/yii/yiilite.php(3763): NewsController->actionIndex() 3758 $controller=$this->getController(); 3759 $method=new ReflectionMethod($controller, $methodName); 3760 if($method->getNumberOfParameters()>0) 3761 return $this->runWithParamsInternal($controller, $method, $params); 3762 else 3763 return $controller->$methodName(); 3764 } 3765 } 3766 class CWebUser extends CApplicationComponent implements IWebUser 3767 { 3768 const FLASH_KEY_PREFIX='Yii.CWebUser.flash.'; |
#5 |
+
–
/home/zakonbase/zakonbase.ru/yii/yiilite.php(3275): CInlineAction->runWithParams(array("var1" => "main", "var2" => "all")) 3270 { 3271 $priorAction=$this->_action; 3272 $this->_action=$action; 3273 if($this->beforeAction($action)) 3274 { 3275 if($action->runWithParams($this->getActionParams())===false) 3276 $this->invalidActionParams($action); 3277 else 3278 $this->afterAction($action); 3279 } 3280 $this->_action=$priorAction; |
#6 |
+
–
/home/zakonbase/zakonbase.ru/yii/yiilite.php(3260): CController->runAction(CInlineAction) 3255 $this->missingAction($actionID); 3256 } 3257 public function runActionWithFilters($action,$filters) 3258 { 3259 if(empty($filters)) 3260 $this->runAction($action); 3261 else 3262 { 3263 $priorAction=$this->_action; 3264 $this->_action=$action; 3265 CFilterChain::create($this,$action,$filters)->run(); |
#7 |
+
–
/home/zakonbase/zakonbase.ru/yii/yiilite.php(3250): CController->runActionWithFilters(CInlineAction, array()) 3245 { 3246 if(($parent=$this->getModule())===null) 3247 $parent=Yii::app(); 3248 if($parent->beforeControllerAction($this,$action)) 3249 { 3250 $this->runActionWithFilters($action,$this->filters()); 3251 $parent->afterControllerAction($this,$action); 3252 } 3253 } 3254 else 3255 $this->missingAction($actionID); |
#8 |
+
–
/home/zakonbase/zakonbase.ru/yii/yiilite.php(1689): CController->run("index") 1684 { 1685 list($controller,$actionID)=$ca; 1686 $oldController=$this->_controller; 1687 $this->_controller=$controller; 1688 $controller->init(); 1689 $controller->run($actionID); 1690 $this->_controller=$oldController; 1691 } 1692 else 1693 throw new CHttpException(404,Yii::t('yii','Unable to resolve the request "{route}".', 1694 array('{route}'=>$route===''?$this->defaultController:$route))); |
#9 |
+
–
/home/zakonbase/zakonbase.ru/yii/yiilite.php(1609): CWebApplication->runController("news/index") 1604 foreach(array_splice($this->catchAllRequest,1) as $name=>$value) 1605 $_GET[$name]=$value; 1606 } 1607 else 1608 $route=$this->getUrlManager()->parseUrl($this->getRequest()); 1609 $this->runController($route); 1610 } 1611 protected function registerCoreComponents() 1612 { 1613 parent::registerCoreComponents(); 1614 $components=array( |
#10 |
+
–
/home/zakonbase/zakonbase.ru/yii/yiilite.php(1135): CWebApplication->processRequest() 1130 } 1131 public function run() 1132 { 1133 if($this->hasEventHandler('onBeginRequest')) 1134 $this->onBeginRequest(new CEvent($this)); 1135 $this->processRequest(); 1136 if($this->hasEventHandler('onEndRequest')) 1137 $this->onEndRequest(new CEvent($this)); 1138 } 1139 public function end($status=0, $exit=true) 1140 { |
#11 |
+
–
/home/zakonbase/zakonbase.ru/www/index.php(19): CApplication->run() 14 //} 15 16 defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL', 3); 17 18 require_once($yii); 19 Yii::createWebApplication($config)->run(); |