Best Practise: Related Field


i am new to yii, really like it but i think i’ve finished all the Newbie Tutorials. Helped a lot. Now to some serious Questions.

I work with fairly complex relational MySQL databases. Of course i want to manage ("crud") more than one table in one list. E.g. i got a list of clients and they have the fields "branchId" and "userId". I do not want to enter an iD but select either a branch name from a dropdown or add a new branch and do something similiar with the userId.

Now i could just go and implement all this by changing the controllers and so on. But do i really have to? What’s the best practise to do something like that?

Do you have any nice tutorials for these things? There’s no book on the subject yet right?

This sounds like you really should take a look at the ‘relation’ widget which suits exaclty your needs, and is even able

to do more than what you have mentioned:

if you have any questions, feel free to ask ;)