CDbException

CDbConnection failed to open the DB connection: SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: NO)

/home/siseccom/public_html/protected/models/Tarea.php(158)

146         {
147             $Id=yii::app()->user->getState("ID");
148             $count=yii::app()->db->createCommand(array(
149                   'select'=>('COUNT(*) as count'),
150                   'from'=>array('Tarea'),
151                   'where'=>'Estado="Pendiente" AND Usuario_Id_Usuario="'.$Id.'"'
152                   ))->queryAll();
153                return $count[0]["count"];
154         }
155         else if($forUser==0)
156         {
157             $Id=yii::app()->user->getState("ID");
158              $count=yii::app()->db->createCommand(array(
159                   'select'=>('COUNT(*) as count'),
160                   'from'=>array('Tarea'),
161                   'where'=>'Estado="Pendiente" AND Usuario_Id_Usuario!="'.$Id.'"'
162                   ))->queryAll();
163                return $count[0]["count"];
164         }elseif($forUser==1)
165         {
166             $comando1 = Yii::app()->db->createCommand(array(
167             'select'=>'Id_Usuario, Area_Trabajo_Id_Area',
168             'from'=>array('Usuario'),
169             'where'=>'Area_Trabajo_Id_Area='.$Area.''
170             ))->queryAll();

Stack Trace

#4
+
 /home/siseccom/public_html/protected/models/Tarea.php(158): CModule->__get("db")
153                return $count[0]["count"];
154         }
155         else if($forUser==0)
156         {
157             $Id=yii::app()->user->getState("ID");
158              $count=yii::app()->db->createCommand(array(
159                   'select'=>('COUNT(*) as count'),
160                   'from'=>array('Tarea'),
161                   'where'=>'Estado="Pendiente" AND Usuario_Id_Usuario!="'.$Id.'"'
162                   ))->queryAll();
163                return $count[0]["count"];
#5
+
 /home/siseccom/public_html/protected/controllers/TareaController.php(350): Tarea->countRegistros(null)
345         }elseif($Usuario=="Ingeniero"){
346             $forUser=2;
347 
348         }
349         
350         $count=Tarea::model()->countRegistros($forUser);
351         $pages=new CPagination($count);
352         $cantidad=$pages->pageSize=10;
353 
354         if(!isset($_GET["page"])){ $_GET["page"]=1; }
355 
#18
+
 /home/siseccom/public_html/index.php(13): CApplication->run()
08 defined('YII_DEBUG') or define('YII_DEBUG',true);
09 // specify how many levels of call stack should be shown in each log message
10 defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL',3);
11 
12 require_once($yii);
13 Yii::createWebApplication($config)->run();
2024-03-28 08:37:54 Apache Yii Framework/1.1.17