Hi,
I'm fairly new to CakePHP so if this is a stupid mistake forgive me.
A user will post a complaint against a company, so the complaint table
has company_id. I use a left join to get the company data. Then the
company has a field category_id which is simply the industry of the
company (categories have id / name). When I load a complaint I want to
grab the category name. I manage to get the category ID but cannot do
another left join within this left join.
Hope this makes sense.
At the moment I have;
company.php
var $belongsTo = array('Category');
category.php
var $hasMany = array('Company');
complaint.php
var $belongsTo = array('Company', 'User');
view/complaints/view.thtml
echo $complaint['Company']['category_id']
which i want it to grab Category.name
Appreciate any help.
Thanks.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"CakePHP" 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
-~----------~----~----~----~------~----~------~--~---