CDbException

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

/data/travel_from_112_124_34_134/travel/front/protected/modules/user/models/Member.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()->dbu->tablePrefix.'member';
23     }
24 
25     /**
26     * 添加数据
27     * @return void
28     */
29     public function add($data) {
30         $command = parent::$dbu->createCommand();
31         try {
32             $command->insert(self::model()->tableName(),$data);
33             return Yii::app()->dbu->getLastInsertId();
34         }catch (Exception $e) {

Stack Trace

#4
+
 /data/travel_from_112_124_34_134/travel/front/protected/modules/user/models/Member.php(22): CModule->__get("dbu")
17 
18     /**
19     * @return string the associated database table name
20     */
21     public function tableName() {
22         return Yii::app()->dbu->tablePrefix.'member';
23     }
24 
25     /**
26     * 添加数据
27     * @return void
#7
+
 /data/travel_from_112_124_34_134/travel/front/protected/modules/user/models/Member.php(15): CActiveRecord::model("Member")
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/user/controllers/IndexController.php(278): Member::model()
273      * 判断是否开放浏览权限
274      * @param    integer        $uid        用户id
275      * return    string                    返回是否开放权限
276      */
277     public function actionCheckopen($uid){
278         $open = Member::model()->getRows('open','id = '.$uid);
279         return $open[0]['open'];
280     }
281     
282     /**
283      * ajax查询登录用户是否关注指向用户
2024-03-28 16:22:47 nginx/1.0.4 Yii Framework/1.1.10