CDbException

CDbConnection failed to open the DB connection: SQLSTATE[08004] [1040] Too many connections

/data/travel_from_112_124_34_134/travel/front/protected/models/Channel.php(22)

10     * Returns the static model of the specified AR class.
11     * @param string $className active record class name.
12     * @return Content the static model class
13     */
14     public static function model($className=__Class__){
15         return parent::model($className);
16     }
17     
18     /**
19     * @return string the associated database table name
20     */
21     public function tableName(){
22         return Yii::app()->dbl->tablePrefix.'channel';
23     }
24     
25     /**
26     * 获取一个频道
27     * @param string $where  查询条件
28     * @return array $row  返回一条查询记录
29     */
30     public function getone($where=''){
31         $sql = 'select * from ' . self::tableName() .' where 1=1';
32     if($where){
33             $sql.=" and $where";
34     }

Stack Trace

#4
+
 /data/travel_from_112_124_34_134/travel/front/protected/models/Channel.php(22): CModule->__get("dbl")
17     
18     /**
19     * @return string the associated database table name
20     */
21     public function tableName(){
22         return Yii::app()->dbl->tablePrefix.'channel';
23     }
24     
25     /**
26     * 获取一个频道
27     * @param string $where  查询条件
#7
+
 /data/travel_from_112_124_34_134/travel/front/protected/models/Channel.php(15): CActiveRecord::model("Channel")
10     * Returns the static model of the specified AR class.
11     * @param string $className active record class name.
12     * @return Content the static model class
13     */
14     public static function model($className=__Class__){
15         return parent::model($className);
16     }
17     
18     /**
19     * @return string the associated database table name
20     */
#8
+
 /data/travel_from_112_124_34_134/travel/front/protected/modules/show/models/Content.php(238): Channel::model()
233               return '';
234           }
235           $city = array();
236           $city = Content_cat::model()->getCityEndId($id);
237           if($city) {
238               $city = Channel::model()->getOneCity($city['name']);
239               $city = $this->get_content($city['id']);
240           }
241           return $city;
242       }     
243     
2024-03-28 21:40:31 nginx/1.0.4 Yii Framework/1.1.10