Hello folks,
For a while I’ve been thinking how to do this with Yii the best way, I know how to do it in traditional PHP but I’m not sure if it’s efficient enough and I also thought that Yii had an easier way of doing this. This is what I’m trying to do:
I have two tables in my database: Groups and Items, they are both relational and both have relations configured in their models. Items is an entity of the table Groups.
I want to display all of the groups from the database with a list of all the items that are in it on one single page. So basically the multiple lists next to each other like:
GroupA GroupB GroupC
Item1 ItemA ItemI
Item2 ItemB ItemII
Item3 ItemC ItemIII
Item4 ItemD ItemIV
If anyone has done this or has an idea of how to script this the best way, I’d appreciate if you could leave a reply here with your logic. Thanks in advance