Writing to multiple tables in a single function

Posted 3 years ago by twg_

I have a Roles, Permissions, and Permission_Role tables.

I'm trying to write a function that will write a new role_title and role_slug to my Roles table and then loop through a list of check boxes (Permissions) and write the role_id (from the previous insertion) and permission_id (from the checkbox list.

I hope this makes sense.

Please sign in or create an account to participate in this conversation.