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/destination/controllers/ListController.php(19): Channel::model()
14     
15     /**
16      * 获取周边游模板
17      */
18     public function actionPeriphery(){
19         $a_citys = Channel::model()->getSortCity();
20         $this->title = '目的地-周边游';
21         $s_name = '';
22         foreach($a_citys as $aa_v){
23             foreach($aa_v as $a_v){
24                 if($a_v['cid'] == $_GET['cid']){
2024-03-29 19:34:40 nginx/1.0.4 Yii Framework/1.1.10