Hello.

In my DB I have a table "articles" and a table "pictures" and one article
can have one or more pictures.

I want to display the list of the articles and their photos.
But in my controller I can retrieve the list of the articles but how do I
associate the list of pictures for each article ?
I want to avoid having sql operations in the view to retrieve for each
article the photos, is his possible ?

If I think 'Object Oriented', I should send to the view a list of Articles
containing each all the details from the database of the Article AND a list
of Pictures.

This is how I retrieve the articles :
$this->view->myArticles = $articles->fetchAll($where);

This gives me the Articles objects. How do I associate the photos ?

Maybe there is better way also ?

Thank you for any kind help !!
-- 
View this message in context: 
http://www.nabble.com/Database---relations-tf4577387s16154.html#a13066626
Sent from the Zend Framework mailing list archive at Nabble.com.

Reply via email to