Hi Brendon,

Try something like this:

// What do I need to put here to return all the
contractors linked to $service_id?
$result = $this->Contractors->Services->FindByID($service_id);
if ($result)
{
foreach ($result['Contractor'] as $Contractor)
{
$data[] = Array('Contractor'=>$Contractor);
}
$this->set('data', $data);
}
else
{
$this->set('data', Array());
}

This gives me an opportunity to ask a question of my own: There is no
sort order applied at all to the sql for this kind of search - how can
the results be sorted.

Cheers,

AD7six


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

Reply via email to