<thead class="text-center"> <tr> <!-- id_cuestionario serial NOT NULL, nombre character varying(255) NOT NULL, grado_madurez integer NOT NULL, descripcion character varying(255), id_unidad_negocio integer NOT NULL,--> <th>Nombre</th> <th>Descripción</th> </tr> </thead> <tbody class="text-center"> <?php $cuestionario = new Cuestionario(); $cuestionarios = $cuestionario->findAll(); foreach ($cuestionarios as $value) { ?> <tr> <td> <?php echo $value->nombre; ?> </td> <td> <?php echo $value->descripcion; ?>
echo $Cuestionarios->nombre; echo '<br>'; echo '<br>'; echo 'DESCRIPCION: '; echo $Cuestionarios->descripcion; echo '<br>'; } ?> </i> </div> </div> <!-- <?php $cuestionario = new Cuestionario(); $Cuestionarios = $cuestionario->findByAttributes(array('id_cuestionario' => 1)); if ($Cuestionarios != null) { // echo '';$preguntasEspesificas = $preguntaEspesifica->findAll(); $un = new UnidadNegocio(); $uns = $un->findByAttributes(array('id_empresa' => $Cuestionarios->idUnidadNegocio->id_empresa)); echo 'NOMBRE: '; echo $uns->nombre; echo '<br>'; echo 'DESCRIPCION: '; echo $uns->descripcion; ?> <?php } ?>
/** * Returns the data model based on the primary key given in the GET variable. * If the data model is not found, an HTTP exception will be raised. * @param integer $id the ID of the model to be loaded * @return Cuestionario the loaded model * @throws CHttpException */ public function loadModel($id) { $model = Cuestionario::model()->findByPk($id); if ($model === null) { throw new CHttpException(404, 'The requested page does not exist.'); } return $model; }