車勢汽車網-全國最大修車機油保養輪胎洗車優惠與保障平台

推薦修車保養廠

車勢網LINE 註冊 / 登入
電話:02-25982202,如有檔案要夾帶,可以來信 e-mail: sales@carce.cc

聯絡我們



資料讀取中
CDbException

CDbException

The table "counts" for active record class "Counts" cannot be found in the database.

/var/www/vhosts/carce.cc/httpdocs/framework/db/ar/CActiveRecord.php(2310)

2298     private $_model;
2299 
2300     /**
2301      * Constructor.
2302      * @param CActiveRecord $model the model instance
2303      */
2304     public function __construct($model)
2305     {
2306         $this->_model=$model;
2307 
2308         $tableName=$model->tableName();
2309         if(($table=$model->getDbConnection()->getSchema()->getTable($tableName))===null)
2310             throw new CDbException(Yii::t('yii','The table "{table}" for active record class "{class}" cannot be found in the database.',
2311                 array('{class}'=>get_class($model),'{table}'=>$tableName)));
2312         if($table->primaryKey===null)
2313         {
2314             $table->primaryKey=$model->primaryKey();
2315             if(is_string($table->primaryKey) && isset($table->columns[$table->primaryKey]))
2316                 $table->columns[$table->primaryKey]->isPrimaryKey=true;
2317             elseif(is_array($table->primaryKey))
2318             {
2319                 foreach($table->primaryKey as $name)
2320                 {
2321                     if(isset($table->columns[$name]))
2322                         $table->columns[$name]->isPrimaryKey=true;

Stack Trace

#1
+
 /var/www/vhosts/carce.cc/httpdocs/protected/models/Counts.php(18): CActiveRecord::model("Counts")
13      * @param string $className active record class name.
14      * @return Counts the static model class
15      */
16     public static function model($className=__CLASS__)
17     {
18         return parent::model($className);
19     }
20 
21     /**
22      * @return string the associated database table name
23      */
#2
+
 /var/www/vhosts/carce.cc/httpdocs/protected/components/Controller.php(907): Counts::model()
902             else
903                 echo $output;
904         }
905         if ( !$_SESSION['counts'] ) {
906             // 計算瀏覽數,目前不算手機版,沒排除重覆
907             $viewers = Counts::model()->findAll();
908             foreach ($viewers as $k => $v) {
909                 $v['counts'] = $v['counts'] + 1;
910                 $v->update();
911             }
912             $_SESSION['counts'] = TRUE;
#3
+
 /var/www/vhosts/carce.cc/httpdocs/protected/controllers/SiteController.php(433): Controller->render("contact", array("baseUrl" => "https://www.carce.cc"))
428             $criteria = new CDbCriteria;
429             $criteria -> condition = 'id=:id';
430             $criteria -> params = array(':id' => Yii::app() -> session['userID']);
431             $viewData['user'] = User::model() -> find($criteria);
432         }
433         $this -> render('contact', $viewData);
434     }
435 
436     public function actionContactNew() {
437         return false;
438         $contact = new Contact;
2020-08-15 06:49:02 Apache Yii Framework/1.1.13