CDbException

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

/home/zikbay/public_html/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/zikbay/public_html/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/zikbay/public_html/protected/modules/Ads/controllers/AdController.php(2073): AnnonceBase::model()
2068 
2069         $model = new EmailAdToFriendForm();
2070 
2071         $ad_id = $this->get('id','');
2072 
2073         $ad = Annonce::model()->find('id=:id AND public = 1',array(':id'=>$ad_id));
2074 
2075         $sendSuccessfully = FALSE;
2076 
2077         if (Yii::app()->request->isPostRequest && !is_null($ad))
2078 
#10
+
 /home/zikbay/public_html/index.php(25): CApplication->run()
20     )
21 {
22     require_once(dirname(__FILE__).'/protected/modules/install/install.php');
23 }else{
24     require_once($yii);
25     Yii::createWebApplication($config)->run();
26 }
2021-04-21 13:23:49 Apache/2.4.39 (Unix) OpenSSL/1.0.2k-fips Yii Framework/1.1.7