CDbException

The table "home_links" for active record class "HomeLinks" cannot be found in the database.

/home1/vsskochi/public_html/framework/db/ar/CActiveRecord.php(2362)

2350 
2351     /**
2352      * Constructor.
2353      * @param CActiveRecord $model the model instance
2354      * @throws CDbException if specified table for active record class cannot be found in the database
2355      */
2356     public function __construct($model)
2357     {
2358         $this->_modelClassName=get_class($model);
2359 
2360         $tableName=$model->tableName();
2361         if(($table=$model->getDbConnection()->getSchema()->getTable($tableName))===null)
2362             throw new CDbException(Yii::t('yii','The table "{table}" for active record class "{class}" cannot be found in the database.',
2363                 array('{class}'=>$this->_modelClassName,'{table}'=>$tableName)));
2364         if($table->primaryKey===null)
2365         {
2366             $table->primaryKey=$model->primaryKey();
2367             if(is_string($table->primaryKey) && isset($table->columns[$table->primaryKey]))
2368                 $table->columns[$table->primaryKey]->isPrimaryKey=true;
2369             elseif(is_array($table->primaryKey))
2370             {
2371                 foreach($table->primaryKey as $name)
2372                 {
2373                     if(isset($table->columns[$name]))
2374                         $table->columns[$name]->isPrimaryKey=true;

Stack Trace

#2
+
 /home1/vsskochi/public_html/protected/controllers/SiteController.php(35): CActiveRecord->__construct()
30 
31     public function actionIndex()
32     {
33          $this->layout="home";
34          $term = Yii::app()->request->getPathInfo() ;
35          $links = new HomeLinks;
36          $content = $links->find(array("condition"=>"link_name='Home'")) ;
37          $this->pageTitle = $content['meta_title'];
38          $this->meta_keywords = $content['meta_keywords'];
39          $this->meta_description = $content['meta_description'];         
40          $this->render("index",array( 'content'=> $content));
#10
+
 /home1/vsskochi/public_html/index.php(14): CApplication->run()
09 
10 // remove the following line when in production mode
11  defined('YII_DEBUG') or define('YII_DEBUG',true);
12 
13 require_once($yii);
14 Yii::createWebApplication($config)->run();
2026-07-07 16:51:55 LiteSpeed Yii Framework/1.1.14