CDbException

ตาราง "hotels" สำหรับบันทึกข้อมูลของ "TravelHotels" ไม่พบในฐานข้อมูล

/home/admin/domains/phuket108.com/public_html/yii-framework/framework/db/ar/CActiveRecord.php(2385)

2373 
2374     /**
2375      * Constructor.
2376      * @param CActiveRecord $model the model instance
2377      * @throws CDbException if specified table for active record class cannot be found in the database
2378      */
2379     public function __construct($model)
2380     {
2381         $this->_modelClassName=get_class($model);
2382 
2383         $tableName=$model->tableName();
2384         if(($table=$model->getDbConnection()->getSchema()->getTable($tableName))===null)
2385             throw new CDbException(Yii::t('yii','The table "{table}" for active record class "{class}" cannot be found in the database.',
2386                 array('{class}'=>$this->_modelClassName,'{table}'=>$tableName)));
2387                 
2388         if(($modelPk=$model->primaryKey())!==null || $table->primaryKey===null)
2389         {
2390             $table->primaryKey=$modelPk;
2391             if(is_string($table->primaryKey) && isset($table->columns[$table->primaryKey]))
2392                 $table->columns[$table->primaryKey]->isPrimaryKey=true;
2393             elseif(is_array($table->primaryKey))
2394             {
2395                 foreach($table->primaryKey as $name)
2396                 {
2397                     if(isset($table->columns[$name]))

Stack Trace

#4
+
 /home/admin/domains/phuket108.com/public_html/protected/controllers/HotelController.php(175): CActiveRecord->find("slug = :slug", array(":slug" => "stay-wellbeing-and-lifestyle-resort-sha-plus"))
170 
171     // }
172 
173     public function actionDetail($slug = NULL) {
174 
175         $hotel = TravelHotels::model()->find('slug = :slug', array(':slug' => $slug));
176 
177         // echo $hotel->hotel_name;
178 
179         // echo $slug;
180 
#14
+
 /home/admin/domains/phuket108.com/public_html/index.php(13): CApplication->run()
08 defined('YII_DEBUG') or define('YII_DEBUG',true);
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 
12 require_once($yii);
13 Yii::createWebApplication($config)->run();
2024-03-28 21:16:24 Apache/2 Yii Framework/1.1.16