I have a profile table, module table and book table. A profile has many
modules, a module has many books. Module belongs to profile and book
belongs to module.
When a user accesses a profile, the profile and the associated modules
and books will be locked. Meaning that other users cannot edit or delete
this profile and the associated modules and books.
How can I achieve that? Someone please help.