Thank you all for your smart answers.
According to your suggestion, Samuel, I tried
$this->cacheQueries = false;
But it did not change the result.
Djiize, I can't use $this->Agent->findAllByTypeId(1)

here is my function

function listedesagents ($role=null){

$this->sql_desagents = $this->findAll('IDS_role='.$role);
foreach ($this->sql_desagents as $rang) {

$IDP_agent= $rang['Agent']['IDP_agent'];

$nomAgent= utf8_decode($rang['Agent']['prenomAgent']);
$nomAgent.=' '. utf8_decode($rang['Agent']['nomAgent']);

  $this->desagents[$IDP_agent] = $nomAgent;
}
return $this->desagents;
}

here is the table:

TABLE `tb_agents` (
  `IDP_agent` int(10) unsigned NOT NULL auto_increment,
  `nomAgent` varchar(50) NOT NULL default '',
  `prenomAgent` varchar(25) NOT NULL default '',
  `IDS_creneau` int(4) default NULL,
  `IDS_role` int(1) default NULL,
  PRIMARY KEY  (`IDP_agent`)
)

Thank you for any suggestion
Steniskis


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to