CDbException

E:\phpstudy_pro\WWW\htdocs\framework\db\CDbConnection.php(381)

369                 throw new CDbException('CDbConnection.connectionString cannot be empty.');
370             try
371             {
372                 Yii::trace('Opening DB connection','system.db.CDbConnection');
373                 $this->_pdo=$this->createPdoInstance();
374                 $this->initConnection($this->_pdo);
375                 $this->_active=true;
376             }
377             catch(PDOException $e)
378             {
379                 if(YII_DEBUG)
380                 {
381                     throw new CDbException('CDbConnection failed to open the DB connection: '.
382                         $e->getMessage(),(int)$e->getCode(),$e->errorInfo);
383                 }
384                 else
385                 {
386                     Yii::log($e->getMessage(),CLogger::LEVEL_ERROR,'exception.CDbException');
387                     throw new CDbException('CDbConnection failed to open the DB connection.',(int)$e->getCode(),$e->errorInfo);
388                 }
389             }
390         }
391     }
392 
393     /**

Stack Trace

#7
+
 E:\phpstudy_pro\WWW\htdocs\protected\models\link.php(8): CActiveRecord::model("link")
03 class link extends CActiveRecord
04 {
05 
06     public static function model($className=__CLASS__)
07     {
08         return parent::model($className);
09     }
10 
11     public function tableName()
12     {
13         return '{{link}}';
#8
+
 E:\phpstudy_pro\WWW\htdocs\protected\controllers\BaseController.php(45): link::model()
40 
41         $criteria=new CDbCriteria;
42         $criteria->limit=12;
43         $criteria->order="ordid desc,add_time desc,id desc";
44         $criteria->condition=" cate_id in (190) and status=1";
45         $this->friends=link::model()->findAll($criteria);
46 
47 
48         $criteria->limit=10;
49         $criteria->order="sort_order";
50 
#9
+
 E:\phpstudy_pro\WWW\htdocs\protected\controllers\ListController.php(16): BaseController->init()
11     public $PAGE_SIZE=20;
12     public $casediy=array();
13     public $casetype=array();
14     
15     public function init() {
16         parent::init();
17     }
18 
19     public function actionIndex()
20     {
21         $id=intval($_GET["id"]);
2024-03-29 01:44:03 nginx/1.15.11 Yii Framework/1.1.13