CDbException

The table "annonce" for active record class "Annonce" cannot be found in the database.

/home/coxixtul/domains/adswan.com/public_html/bi/yii-1.1.7.r3135/framework/db/ar/CActiveRecord.php(2237)

2225     private $_model;
2226 
2227     /**
2228      * Constructor.
2229      * @param CActiveRecord $model the model instance
2230      */
2231     public function __construct($model)
2232     {
2233         $this->_model=$model;
2234 
2235         $tableName=$model->tableName();
2236         if(($table=$model->getDbConnection()->getSchema()->getTable($tableName))===null)
2237             throw new CDbException(Yii::t('yii','The table "{table}" for active record class "{class}" cannot be found in the database.',
2238                 array('{class}'=>get_class($model),'{table}'=>$tableName)));
2239         if($table->primaryKey===null)
2240             $table->primaryKey=$model->primaryKey();
2241         $this->tableSchema=$table;
2242         $this->columns=$table->columns;
2243 
2244         foreach($table->columns as $name=>$column)
2245         {
2246             if(!$column->isPrimaryKey && $column->defaultValue!==null)
2247                 $this->attributeDefaults[$name]=$column->defaultValue;
2248         }
2249 

Stack Trace

#1
+
 /home/coxixtul/domains/adswan.com/public_html/bi/protected/modules/Ads/models/base/AnnonceBase.php(52): CActiveRecord::model("Annonce")
47      * Returns the static model of the specified AR class.
48      * @return Annonce the static model class
49      */
50     public static function model($className='Annonce')
51     {
52         return parent::model($className);
53     }
54 
55     /**
56      * @return string the associated database table name
57      */
#2
+
 /home/coxixtul/domains/adswan.com/public_html/bi/protected/components/HomePageAdsGallery.php(15): AnnonceBase::model()
10         $criteria->select = array('id','title','price','opt_price','area','photos');
11         $criteria->condition = "homepage = 1 AND public = 1";
12         if ($this->selectedLocation!='')
13             $criteria->addCondition("area = '{$this->selectedLocation}'");
14         $criteria->order = "create_time DESC";
15         $ads = Annonce::model()->findAll($criteria);
16         $this->render('HomePageAdsGallery',array('ads'=>$ads));    
17     }
18 }
#4
+
 /home/coxixtul/domains/adswan.com/public_html/bi/themes/classified/views/site/home.php(6): CBaseController->widget("HomePageAdsGallery", array("selectedLocation" => ""))
01 <?php
02 include_once(Yii::getPathOfAlias("webroot").'/protected/modules/Core/extensions/web/helpers/FlexImage.php');
03 include_once(Yii::getPathOfAlias("webroot").'/protected/modules/Core/extensions/web/helpers/string.php');
04 ?>
05 
06 <?php $this->widget('HomePageAdsGallery',array('selectedLocation'=>$this->get('location',''))); ?>
07 <div class="main-content">
08     <?php $this->widget('AdsCategoryList',array('selectedLocation'=>$this->get('location',''))); ?>
09     <div class="facebook">
10         <fb:like href="<?php echo baseUrl(); ?>" send="false" width="450" show_faces="false"></fb:like>
11     </div>     
2021-08-03 03:58:09 LiteSpeed Yii Framework/1.1.7