On 31 Jan, 23:49, "Matias Lespiau" <[EMAIL PROTECTED]> wrote:
> I think your problem is that you're asking cake to just bring you the id's:
>
Thanks
I've tried that
I now have
$l = $this->Job->Manager->find('all', array('fields' =>
array('Manager.id', 'Manager.user_id', 'User.first_name',
'User.surname')));
$result = Set::combine($l, "{n}.Manager.id",
"{n}.Manager.user_id");
$this->set('managers', $result);
but now I get the error;
Query: SELECT `Manager`.`id`, `Manager`.`user_id`,
`User`.`first_name`, `User`.`surname` FROM `managers` AS `Manager`
WHERE 1 = 1
Warning (512): SQL Error: 1109: Unknown table 'User' in field list
[CORE/cake/libs/model/datasources/dbo_source.php, line 440]
I suspect this is because the two tables aren't linked in that way.
Not sure....its getting late at night so may not be thinking about
this the right way either! (which probably isnt helping)
J
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---