/www/wwwroot/www.mingzhengjx.com/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 |
+
–
/www/wwwroot/www.mingzhengjx.com/framework/db/CDbCommand.php(396): CDbCommand->queryInternal("fetchAll", array(2), array()) 391 * An empty array is returned if the query results in nothing. 392 * @throws CException execution failed 393 */ 394 public function queryAll($fetchAssociative=true,$params=array()) 395 { 396 return $this->queryInternal('fetchAll',$fetchAssociative ? $this->_fetchMode : PDO::FETCH_NUM, $params); 397 } 398 399 /** 400 * Executes the SQL statement and returns the first row of the result. 401 * This is a convenient method of {@link query} when only the first row of data is needed. |
#1 |
+
–
/www/wwwroot/www.mingzhengjx.com/framework/db/schema/sqlite/CSqliteSchema.php(134): CDbCommand->queryAll() 129 * @return boolean whether the table exists in the database 130 */ 131 protected function findColumns($table) 132 { 133 $sql="PRAGMA table_info({$table->rawName})"; 134 $columns=$this->getDbConnection()->createCommand($sql)->queryAll(); 135 if(empty($columns)) 136 return false; 137 138 foreach($columns as $column) 139 { |
#2 |
+
–
/www/wwwroot/www.mingzhengjx.com/framework/db/schema/sqlite/CSqliteSchema.php(117): CSqliteSchema->findColumns(CDbTableSchema) 112 { 113 $table=new CDbTableSchema; 114 $table->name=$name; 115 $table->rawName=$this->quoteTableName($name); 116 117 if($this->findColumns($table)) 118 { 119 $this->findConstraints($table); 120 return $table; 121 } 122 else |
#3 |
+
–
/www/wwwroot/www.mingzhengjx.com/framework/db/schema/CDbSchema.php(103): CSqliteSchema->loadTable("mt_option") 098 $cache->set($key,$table,$duration); 099 } 100 $this->_tables[$name]=$table; 101 } 102 else 103 $this->_tables[$name]=$table=$this->loadTable($realName); 104 105 if(isset($qcDuration)) // re-enable query caching 106 $this->_connection->queryCachingDuration=$qcDuration; 107 108 return $table; |
#4 |
+
–
/www/wwwroot/www.mingzhengjx.com/framework/db/ar/CActiveRecord.php(2382): CDbSchema->getTable("{{option}}") 2377 public function __construct($model) 2378 { 2379 $this->_modelClassName=get_class($model); 2380 2381 $tableName=$model->tableName(); 2382 if(($table=$model->getDbConnection()->getSchema()->getTable($tableName))===null) 2383 throw new CDbException(Yii::t('yii','The table "{table}" for active record class "{class}" cannot be found in the database.', 2384 array('{class}'=>$this->_modelClassName,'{table}'=>$tableName))); 2385 if($table->primaryKey===null) 2386 { 2387 $table->primaryKey=$model->primaryKey(); |
#5 |
+
–
/www/wwwroot/www.mingzhengjx.com/framework/db/ar/CActiveRecord.php(411): CActiveRecordMetaData->__construct(Option) 406 { 407 $className=get_class($this); 408 if(!array_key_exists($className,self::$_md)) 409 { 410 self::$_md[$className]=null; // preventing recursive invokes of {@link getMetaData()} via {@link __get()} 411 self::$_md[$className]=new CActiveRecordMetaData($this); 412 } 413 return self::$_md[$className]; 414 } 415 416 /** |
#6 |
+
–
/www/wwwroot/www.mingzhengjx.com/framework/db/ar/CActiveRecord.php(661): CActiveRecord->getMetaData() 656 * Returns the metadata of the table that this AR belongs to 657 * @return CDbTableSchema the metadata of the table that this AR belongs to 658 */ 659 public function getTableSchema() 660 { 661 return $this->getMetaData()->tableSchema; 662 } 663 664 /** 665 * Returns the command builder used by this AR. 666 * @return CDbCommandBuilder the command builder used by this AR |
#7 |
+
–
/www/wwwroot/www.mingzhengjx.com/framework/db/ar/CActiveRecord.php(1488): CActiveRecord->getTableSchema() 1483 */ 1484 public function findByPk($pk,$condition='',$params=array()) 1485 { 1486 Yii::trace(get_class($this).'.findByPk()','system.db.ar.CActiveRecord'); 1487 $prefix=$this->getTableAlias(true).'.'; 1488 $criteria=$this->getCommandBuilder()->createPkCriteria($this->getTableSchema(),$pk,$condition,$params,$prefix); 1489 return $this->query($criteria); 1490 } 1491 1492 /** 1493 * Finds all active records with the specified primary keys. |
#8 |
+
–
/www/wwwroot/www.mingzhengjx.com/protected/components/Controller.php(25): CActiveRecord->findByPk(1) 20 * be assigned to {@link CBreadcrumbs::links}. Please refer to {@link CBreadcrumbs::links} 21 * for more details on how to specify this property. 22 */ 23 public $breadcrumbs=array(); 24 public function init(){ 25 $this->optionInfo=Option::model()->findByPk(1); 26 } 27 } |
#9 |
+
–
/www/wwwroot/www.mingzhengjx.com/framework/web/CWebApplication.php(281): Controller->init() 276 if(($ca=$this->createController($route))!==null) 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}".', |
#10 |
+
–
/www/wwwroot/www.mingzhengjx.com/framework/web/CWebApplication.php(141): CWebApplication->runController("product/view") 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. |
#11 |
+
–
/www/wwwroot/www.mingzhengjx.com/framework/base/CApplication.php(184): CWebApplication->processRequest() 179 public function run() 180 { 181 if($this->hasEventHandler('onBeginRequest')) 182 $this->onBeginRequest(new CEvent($this)); 183 register_shutdown_function(array($this,'end'),0,false); 184 $this->processRequest(); 185 if($this->hasEventHandler('onEndRequest')) 186 $this->onEndRequest(new CEvent($this)); 187 } 188 189 /** |
#12 |
+
–
/www/wwwroot/www.mingzhengjx.com/common.php(14): CApplication->run() 09 // specify how many levels of call stack should be shown in each log message 10 defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL', 3); 11 require_once($yii); 12 $app = Yii::createWebApplication($config); 13 require_once($globals); 14 $app->run(); |
#13 |
+
–
/www/wwwroot/www.mingzhengjx.com/index.php(13): require_once("/www/wwwroot/www.mingzhengjx.com/common.php") 08 $config=dirname(__FILE__).'/protected/config/main.php'; 09 } 10 11 12 $globals = dirname(__FILE__) . '/protected/globals.php'; 13 require_once('./common.php'); |