I'm trying to do this:
$customers = $this->Customer->find('list', array('conditions' => //some code));
$conditions = array('Event.customer_id' => $customers //here's the problem);
$this->Event->find('all', ('conditions' => $conditions));
the $customers find returns:
array(
[id1] => "Cust name 1",
[id2] => "Cust name 2",
...
[idn] => "Cust name n")
while I need that in the $conditions the $customers array should be a list of customer id's to find what I need, instead it uses the display value (es. "Cust name n") so the find returns an empty $events variable.
How is possible to use the array index instead of the array value in a find condition filter?
I know this could be easy but I'm really stuck here.
thanks.