CDbException

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

/home/recordq/public_html/sitioweb/www/protected/models/Producto.php(200)

188                 'setUpdateOnCreate' => true,
189                 )
190             );
191     }
192     public function providerListado($cat){
193 
194         $sql="select a.id,a.nombre,a.codigo,a.posicion,a.categoria_id,IFNULL(b.imagen,'default.jpg')as imagen from (SELECT * FROM producto a, producto_categoria b where a.id=b.producto_id and b.categoria_id=".$cat." and eliminado=0 order by posicion)a LEFT JOIN imagen b ON a.id = b.producto_id and tipo=1;";
195         $listado=Yii::app()->db->createCommand($sql)->queryAll();
196         return $listado;
197     }
198     public function getListaProductos($subId){
199         $sql="select id from categoria where padre = ".$subId;
200         $listado=Yii::app()->db->createCommand($sql)->queryAll();
201         $idCategoria="";
202         while ($listado) {
203             $i=0;
204             $idCompara="";
205             foreach ($listado as $key => $value) {
206                 $idCompara.=$value["id"];
207                 if ($i<count($listado)-1) {
208                     $idCompara.=",";
209                 }
210                 $i++;
211             }
212             if ($idCategoria!="") {

Stack Trace

#4
+
 /home/recordq/public_html/sitioweb/www/protected/models/Producto.php(200): CModule->__get("db")
195         $listado=Yii::app()->db->createCommand($sql)->queryAll();
196         return $listado;
197     }
198     public function getListaProductos($subId){
199         $sql="select id from categoria where padre = ".$subId;
200         $listado=Yii::app()->db->createCommand($sql)->queryAll();
201         $idCategoria="";
202         while ($listado) {
203             $i=0;
204             $idCompara="";
205             foreach ($listado as $key => $value) {
#5
+
 /home/recordq/public_html/sitioweb/www/protected/controllers/ProductoController.php(213): Producto->getListaProductos("56")
208         if ($marca!=0) {
209             $condition = ' and marca_id='.$marca;
210         }
211 
212         $this->layout = "mainfrontend";
213         $idCategorias=Producto::model()->getListaProductos($subId);
214         $dataProvider=new CActiveDataProvider('Producto', array(
215             'criteria'=>array(
216                 'condition'=>'publicar=1 and eliminado=0 '.$condition.' and productoCat.categoria_id in ('.$idCategorias.')',
217                 'order'=>'productoCat.posicion ASC',
218                 'with'=>array('imagenPrincipal', 'medida','productoCat'),
#20
+
 /home/recordq/public_html/sitioweb/www/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-19 05:40:04 Apache Yii Framework/1.1.15