<?phpinclude('../../inc/confNetisse.php');$TERM=$_REQUEST["term"];$JSON="";// #######################################################################$q='SELECT id_agence, eds, code_agence, nom_agence FROM ca_agences WHERE supp=0 AND eds LIKE :eds ORDER BY nom_agence ASC';$values=array(':eds'=>'%'.$TERM.'%');$result=excuteQuery($q,$values);$res=$result['stmt'];$n=$res->rowCount();if($n>0){$JSON=array();while($o=$res->fetchObject()){array_push($JSON,array("value"=>$o->eds,"label"=>$o->nom_agence,"agencyId"=>$o->id_agence,"agencyEDS"=>$o->eds));}}echojson_encode($JSON);?>