Santhanam
(Santhanam Srishti)
1
Hi,
I have two tables book & publisher.
Using the following article, i was able to create form for inserting records.
http://www.yiiframework.com/wiki/218/how-to-use-single-form-to-collect-data-for-two-or-more-models-cactiveform-and-ajax-validation-edition/
But i would like to display the details of the book along with publisher in a CGridView.
I searched in documentation & forums, but could not get any idea.
Please help me.
Thanks In Advance
With Regards
Santhanam
kokomo
(Mwerlberger85)
2
You have to define relations and use with if you use ActiveRecords or join the tables manually if you use CSqlDataProvider.
See the post from zaccaria and/or the solved post in this thread.
Also this blog post or this post could be helpful for you.