Problems connector_units fill type combo

hello!!!

I have the following problem NEED to fill a combo in the form of the planner with the names of certain people who come from a sql query planner and leave the events associated with people sas something like 17 connector_units code example I am presenting the follows …

$res= Conectar::con();

		$cosulta ="SELECT cod_asesor,nombre FROM perf_asesor 
			INNER JOIN asesores ON perf_asesor.cod_perfil=".$GET["VSLOR"]."
			 and 
			 asesores.codigo = perf_asesor.cod_asesor";
			$result  = mysql_query($cosulta,$res);
			
			while ($repuesta= mysql_fetch_array($result)){
		   
			    $codigo_asesores[]=$repuesta["cod_asesor"];	
			   }

///// This first part of the code I present is to see me and bring me the ID of the people I need and save them an array

//////////////////////////////////////////////////////////////////////////

for($i= 0; $i<=sizeof($codigo_asesores[]); $i++){

$list = new OptionsConnector($res);
//$list->render_table(“types”,“typeid”,“typeid(value),name(label)”);
$list-> render_sql (“SELECT codigo as value, nombre as label from asesores Where codigo =”.$codigo_asesores[$i]."","",“value,label”);

$scheduler = new schedulerConnector($res);
//$scheduler->enable_log("log.txt",true);

$scheduler->set_options("cod_asesor", $list);
//$scheduler->render_table("citas","id_cita","fecha_inicial,fecha_final,descripcion,cod_asesor");
$scheduler->render_sql("SELECT * FROM citas WHERE cod_asesor=".$codigo_asesores[$i]."","id_cita","fecha_inicial,fecha_final,descripcion,co_cli,cod_asesor");	 

}

/ / Then put all your code for Querying but the problem is that it does not go through the loop and logically look so good I can do? which is my fault? or to scroll through the API code with a for loop

Gracias Por su ayuda como siempre acertada…

Att desde VENEZUELA…

I think instead of loop

[code]for($i= 0; $i<=sizeof($codigo_asesores[]); $i++){

$list = new OptionsConnector($res);
//$list->render_table(“types”,“typeid”,“typeid(value),name(label)”);
$list-> render_sql (“SELECT codigo as value, nombre as label from asesores Where codigo =”.$codigo_asesores[$i]."","",“value,label”);[/code]

You can use a IN condition

$list = new OptionsConnector($res); //$list->render_table("types","typeid","typeid(value),name(label)"); $list-> render_sql ("SELECT codigo as value, nombre as label from asesores Where codigo IN(".implode(",",$codigo_asesores).")","","value,label");

In such case you will be able to select all options, by single sql query.

Thanks my friend works great … grateful