There is a table of laws tbl_law . There are two other tables: the tbl_cat categories and the tbl_group groups. A law may consist of several categories as well as several groups, and vice versa a single category or group may have several laws (many to many).
I need to make a mark. form to fill:
- law
id - category
id - group
id
In this case, the category id added to the link table tbl_cat_law , and the group id is added to the link table tbl_group_law .
It turns out that the id law should be added at once to two data models (link table tbl_cat_law and tbl_group_law ). How to do it on YII ?
Thanks to the kind people.