tengo un enorme problema que no se como solucionarlo ya llevo tres dias en esto y no se que hacer, hice un select tag para recuperar campos y todo bien pero al momento de leerlos en el combito solo me muestra un campo en el query cuando lo hago desde el mysql me muestra todos los campos pero en el combito no, alguien me ayuda?
esta es mi vista:
<?= form_remote_tag("reportes/nomenclador", "update: right")?>
<div class="mensajes"><? content()?><br></div>
<table width="450" align="center" border="0" cellpadding="0" cellspacing="0" >
<tr>
<td width="201"><div align="left"><strong>Seleccione el nomenclador:</strong> </div></td>
<td width="249"> <div align="left">
<?= select_tag("nomenclador",$listanomenclador,"include_blank: Seleccione uno...","selected: ".$nomencladorSeleccionado);
?>
</select>
</div></td>
</tr>
<tr>
<td colspan="2"> </td>
</tr>
<tr>
<td width="201"><div align="left"><strong>Seleccione un periodo:</strong> </div></td>
<td width="249"> <div align="left">
<?= select_tag("periodo",$listaperiodo,"include_blank: Seleccione uno...","selected: ".$periodoSeleccionado);
?>
</select>
</div></td>
</tr>
<tr>
<td colspan="2"> </td>
</tr>
<tr>
<td width="201"><div align="left"><strong>Seleccione un gestion:</strong> </div></td>
<td width="249"> <div align="left">
<?= select_tag("gestion",$listagestion,"include_blank: Seleccione uno...","selected: ".$gestionSeleccionada);
?>
</select>
</div></td>
</tr>
<tr>
<td colspan="2">
<p align="center"> </p>
<p align="center">
<?= submit_tag("PROCESAR")?>
</p>
<div align="center"><br>
</div></td>
</tr>
</table>
<?= end_form_tag() ?>
</center>
<br>
<br>
<script type="text/javascript">
var nomenclador = new LiveValidation('nomenclador' , {validMessage: " ",onlyOnSubmit: true } );
nomenclador.add( Validate.Presence,{ failureMessage: "Dato necesario" } );
var periodo = new LiveValidation('periodo' , {validMessage: " ",onlyOnSubmit: true } );
periodo.add( Validate.Presence,{ failureMessage: "Dato necesario" } );
var gestion = new LiveValidation('gestion' , {validMessage: " ",onlyOnSubmit: true } );
gestion.add( Validate.Presence,{ failureMessage: "Dato necesario" } );
</script>
y este el controlador:
function nomenclador(){
$this->set_response("view");
$this->nomencladorSeleccionado=$this->request("nomenclador");
$this->periodoSeleccionado=$this->request("periodo");
$this->gestionSeleccionada=$this->request("gestion");
//query de busqueda nomenclador
$nomencladores=$this->Srvvariable->find("codestado='A'");
foreach ($nomencladores as $nomenclador){
$this->listanomenclador["nomenclador->id"]=$nomenclador->idnomenclador;}
//query de busqueda periodo
$periodos=$this->Srvclasificadordetalle->find_all_by_sql("select srvclasificadordetalle.descripcion as descripcion
from srvclasificadordetalle, srvclasificador
where (srvclasificadordetalle.idclasificador=srvclasificador.id) and (srvclasificador.descripcion='periodo')");
foreach ($periodos as $periodo){
$this->listaperiodo["periodo->id"]=$periodo->descripcion;}
//query de busqueda gestiones
$gestiones=$this->Srvclasificadordetalle->find_all_by_sql("select srvclasificadordetalle.descripcion
from srvclasificadordetalle, srvclasificador
where (srvclasificadordetalle.idclasificador=srvclasificador.id) and (srvclasificador.descripcion='gestion')");
foreach ($gestiones as $gestion){
$this->listagestion["gestion->id"]=$gestion->descripcion;}
no se si se debe al select tag o que hago mal....
Comentarios
Éxitos!