thanks it is worked now On Dec 17, 11:01 am, Tilen Majerle <[email protected]> wrote: > you are looking for comments that have id = $id: this is just single comment > > $this->Article->Comment->find('all', array('conditionals' => > array('Comment.article_id' => $id, 'Comment.status' => 1))); > > -- > Lep pozdrav, Tilen Majerlehttp://majerle.eu > > 2011/12/17 ahmed fakher <[email protected]> > > > > > > > > > i use this variable to find the comments that related with articles.. > > > $comment = $this->Article->Comment->findAllById($id); > > > i get errors when i added conditons like this.. > > > $comment = $this->Article->Comment- > > >findAllById($id,array('conditions' => array('Comment.status' => 1))); > > > i see this error>> > > > Warning (512): SQL Error: 1054: Unknown column 'Comment.' in 'field > > list' [CORE\cake\libs\model\datasources\dbo_source.php, line 684] > > Query: SELECT DISTINCT `Comment`.`` FROM `comments` AS `Comment` LEFT > > JOIN `articles` AS `Article` ON (`Comment`.`article_id` = > > `Article`.`id`) WHERE `Comment`.`id` = 15 > > > -- > > Our newest site for the community: CakePHP Video Tutorials > >http://tv.cakephp.org > > Check out the new CakePHP Questions sitehttp://ask.cakephp.organd help > > others with their CakePHP related questions. > > > To unsubscribe from this group, send email to > > [email protected] For more options, visit this group > > athttp://groups.google.com/group/cake-php
-- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/cake-php
