hi, i just start to use cake and my problem follows...
i have a table "lessons" and "questions", association is one-to-many
(lesson has a lot of questions).
i try in my controller of lesson filter questions like this:
function category($id = null){
$this->set('lessons', $this->Lesson->find('all'));
$this->set('filtered_questions', $this->Lesson-
>Question->find('all',
array(
'condition' => array
('Question.lesson_id ' => $id),
'order' => 'Question.id DESC'
)
));
}
But i get all questions. if you need more info, please tell me. Any
help will be great.
Thank you
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---