CDbException

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

/data/school/front/protected/modules/show/models/Content.php(23)

11     * Returns the static model of the specified AR class.
12     * @param string $className active record class name.
13     * @return Content the static model class
14     */
15     public static function model($className=__Class__){
16         return parent::model($className);
17     }
18     
19     /**
20     * @return string the associated database table name
21     */
22     public function tableName(){
23         return Yii::app()->dbc->tablePrefix.'content';
24     }
25 
26     /**
27     * insert
28     * 插入数据
29     * @param mixed $data
30     * @return void
31     */
32     public function add($data)
33     {
34         $command = parent::$dbc->createCommand();
35         try {

Stack Trace

#4
+
 /data/school/front/protected/modules/show/models/Content.php(23): CModule->__get("dbc")
18     
19     /**
20     * @return string the associated database table name
21     */
22     public function tableName(){
23         return Yii::app()->dbc->tablePrefix.'content';
24     }
25 
26     /**
27     * insert
28     * 插入数据
#7
+
 /data/school/front/protected/modules/show/models/Content.php(16): CActiveRecord::model("Content")
11     * Returns the static model of the specified AR class.
12     * @param string $className active record class name.
13     * @return Content the static model class
14     */
15     public static function model($className=__Class__){
16         return parent::model($className);
17     }
18     
19     /**
20     * @return string the associated database table name
21     */
#8
+
 /data/school/front/protected/modules/index/controllers/DefaultController.php(49): Content::model()
44         //暂时显示所有城市
45          $list['citys'] = $cats = Cat::model()->getCitysList($citylist,'all');
46          //默认显示北京
47          //$list['schools'] =Content::model()->getSchoolsList('北京');    
48          //默认显示所有成城市排序
49          $list['city_schools'] = Content::model()->sortSchool($cats);
50         
51          //标题,关键字,描述
52          $this->title = '列表';
53          $this->keywords = '';
54          $this->descption = '';
2024-03-28 19:03:47 nginx/1.0.4 Yii Framework/1.1.10