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/Goods.php(19)

07     * Returns the static model of the specified AR class.
08     * @param string $className active record class name.
09     * @return Content the static model class
10     */
11     public static function model($className=__Class__) {
12         return parent::model($className);
13     }
14 
15     /**
16     * @return string the associated database table name
17     */
18     public function tableName() {
19         return Yii::app()->dbs->tablePrefix.'goods';
20     }
21 
22     /**
23     * @description 根据一个或多个id得到商品的详细信息
24     * @parameter array $id
25     * @return array
26     */
27     public function getGoodsInfoById($id) {
28         if(empty($id)) {
29             return;
30         }
31         $s_id = implode(',', $id);

Stack Trace

#4
+
 /data/travel_from_112_124_34_134/travel/front/protected/models/Goods.php(19): CModule->__get("dbs")
14 
15     /**
16     * @return string the associated database table name
17     */
18     public function tableName() {
19         return Yii::app()->dbs->tablePrefix.'goods';
20     }
21 
22     /**
23     * @description 根据一个或多个id得到商品的详细信息
24     * @parameter array $id
#7
+
 /data/travel_from_112_124_34_134/travel/front/protected/models/Goods.php(12): CActiveRecord::model("Goods")
07     * Returns the static model of the specified AR class.
08     * @param string $className active record class name.
09     * @return Content the static model class
10     */
11     public static function model($className=__Class__) {
12         return parent::model($className);
13     }
14 
15     /**
16     * @return string the associated database table name
17     */
#8
+
 /data/travel_from_112_124_34_134/travel/front/protected/models/RightSideInfo.php(100): Goods::model()
095     public function getRightSideBarHotSaleData(){
096         $a_id = array();
097         foreach($this->a_rightsidebar_data['pc_rightsidebar_hotsale'] as $a_tmp){
098             array_push($a_id, $a_tmp['content_url']);
099         }
100         $this->a_rightsidebar_data['pc_rightsidebar_hotsale'] = Goods::model()->getGoodsInfoById($a_id);
101         $a_num = NumInfoAboutGoods::model()->getMultiNumForMultiGoods($a_id, array(1,2,3));
102         foreach ($this->a_rightsidebar_data['pc_rightsidebar_hotsale'] as $key =>$value){
103             $this->a_rightsidebar_data['pc_rightsidebar_hotsale'][$key]['num_info'] = $a_num[(String)$value['goods_id']];
104         }
105     }
2024-03-19 15:40:31 nginx/1.0.4 Yii Framework/1.1.10