CDbException

The table "{{gaoyong}}" for active record class "GaoyongGroup" cannot be found in the database.

/data/home/www/qtk_php_cms_server2/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
+
 /data/home/www/qtk_php_cms_server2/protected/utils/GaoyongGoodsHelper.php(104): CActiveRecord->findAll(CDbCriteria)
099         $criteria->join = 'left outer join '.$table.' as gy on gy.goodsid=t.goodsid';
100         $criteria->addCondition('gy.goodsid is not null');
101         $criteria->group = 't.cid';
102         $criteria->select = 't.cid,count(t.cid) as cnt';
103         $criteria->order = 't.cid asc';
104         $groups = GaoyongGroup::model()->findAll($criteria);
105 
106         /* @var $groups GaoyongGroup[] */
107 
108         $catNum = [0 => 0];
109         foreach ($groups as $group) {
#5
+
 /data/home/www/qtk_php_cms_server2/protected/controllers/JController.php(28): GaoyongGoodsHelper->getCatNum()
23         $is20 = Yii::app()->request->getParam('i2', 0);
24         $isBoutique = Yii::app()->request->getParam('ib', 0);
25         $sort = Yii::app()->request->getParam('s', 't');
26 
27         $gaoYongGoodsHelper = new GaoyongGoodsHelper();
28         $catNum = $gaoYongGoodsHelper->getCatNum();
29         $result = $gaoYongGoodsHelper->getList($kw, $cid, $is99, $is20, $isBoutique, $sort, ($page - 1) * $limit, $limit);
30 
31 
32         $gidArray = [];
33         foreach ($result['goodsList'] as $goods) {
#13
+
 /data/home/www/qtk_php_cms_server2/index.php(77): CApplication->run()
72 // specify how many levels of call stack should be shown in each log message
73 defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL', 3);
74 
75 require_once(__DIR__.'/vendor/autoload.php');
76 require_once($yii);
77 Yii::createWebApplication($config)->run();
2017-12-12 00:48:06 nginx/1.6.2 Yii Framework/1.1.16