PDA

View Full Version : added module, erasing module's records related to company_id


stewie
03-06-04, 07:54 AM
Hello,

I have added a module to my dotproject program called 'Employees'. Each company now has an 'Employees' tab. When I erase a company, I would like to automatically erase all the employees that belong to the deleted company. How can I do this? Right now I am manually erasing the employee records in the 'do_company_aed.php' page but it does not seem like a clean solution to me.

Revelation7
15-06-04, 03:44 AM
By manually erasing you mean doing an SQL statement? What could be more clean? Perhaps you can build an base funtion in the company class that deletes all the related objects upon company deletion, but that would be some work...