Hello,

Thank you for your time, I am a new user of CakePHP. I recently found
CakePHP and am still trying to get used to the MVC architecture. (By
the way, it's brilliant). However I'm still getting used to
reformatting my SQL into cakephp.

My question is as follows. I have an SQL statement that (simplified)
is like the following:

select i.name
from item i, city c, category ca
where ca.id = i.category_id
and c.id = i.city_id
and ca.label = "Doctors"
and c.label = "Boston"


I have been able to create step one --

$this->set('items', $this->Item->findAllByCategoryId('1'));

And now I'm totally stuck, as this is the first model I've created. I
had a look through the model documentation but couldn't see anywhere
that dealt with SQL from two tables :-(

Thanks
Andrew

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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

Reply via email to