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/Canton.php(144)

132         if(!$listado) return array();
133         $arreglo=array();
134         foreach($listado as $item)
135         {
136             $arreglo[$item->id] = $item->nombre;
137         }
138         return $arreglo;
139     }
140     public function providerMapa() {
141         $sql = "SELECT distinct(a.canton_id) as id, b.nombre as nombre
142                 FROM mapa a, canton b
143                 WHERE a.canton_id = b.id;";
144         $listado = Yii::app()->db->createCommand($sql)->queryAll();
145         return $listado;
146     }
147 }

Stack Trace

#4
+
 /home/recordq/public_html/sitioweb/www/protected/models/Canton.php(144): CModule->__get("db")
139     }
140     public function providerMapa() {
141         $sql = "SELECT distinct(a.canton_id) as id, b.nombre as nombre
142                 FROM mapa a, canton b
143                 WHERE a.canton_id = b.id;";
144         $listado = Yii::app()->db->createCommand($sql)->queryAll();
145         return $listado;
146     }
147 }
#5
+
 /home/recordq/public_html/sitioweb/www/protected/components/views/panelMapa.php(18): Canton->providerMapa()
13             Contactos
14         </h2>
15         <div class="row margin-top-20">
16 
17              <?php
18                 $cantones = Canton::model()->providerMapa();
19                 if (sizeof($cantones)>0) {
20                     $i = 0;
21                     foreach ($cantones as $value) {
22                         $locales = Mapa::model()->findAll("canton_id=".$value['id']." order by id");
23                         if (sizeof($locales)>0) {
#9
+
 /home/recordq/public_html/sitioweb/www/protected/components/PanelMapa.php(24): CWidget->render("panelMapa")
19     }
20 
21     public function run()
22     {
23         // this method is called by CController::endWidget()
24         $this->render('panelMapa');
25     }
26 }
2024-03-19 00:27:08 Apache Yii Framework/1.1.15