Re: Help with $this->Model->find('all')

2008-05-01 Thread [EMAIL PROTECTED]
Cake doesn't have an excellent way of doing this yet but grigri posted this method the other day: http://groups.google.com/group/cake-php/browse_thread/thread/863305f8a7267067 which is a lot better than writing out the SQL by hand. quoted (grigri): I know nothing about using MySQL views, but I

Help with $this->Model->find('all')

2008-05-01 Thread clrockwell
I have two associated models - Newproduct hasMany Newproductimage - Ideally, I need to do a find that only returns the Newproductimage where 'newproductimage.thumbnail' is set to 1 Doing: $conditions = array('Newproductimage.thumbnail' => 1) $this->Newproduct->find('all', array('conditions' => $