Search Criteria With Related Tables

Hi everybody, I am new in Yii Framework (I have read some tutorial, and video tutorial too).

But I am having some difficult trying to made a search with filter.

I have two table related (books and category). In a form I want to create two dropdowmlist one with category, once the user choose the category the list of books in the second dropdownlist have to be updated for just those book with have category previously choose.

then once user click on search this filter (select * from books where category like ‘horror’)then is going to show in a grid below.

anythig would be good thanks. :rolleyes:

pls read this wiki and you will get clear idea on creating dependent dropdown list and then go forward