Hello,
is there any automatism to delete related records after having deleted a 'parent' record?
Christian
automatism to delete related records
4 posts
• Page 1 of 1
automatism to delete related recordsHello,
is there any automatism to delete related records after having deleted a 'parent' record? Christian
Best way is to use the INNODB storage engine for those tables, and then use a foreign key relationship with "on delete cascade".
That way the database will always stay consistent. The alternative is to use an afterDelete() trigger in the parent record to delete the child.
4 posts
• Page 1 of 1
Who is onlineUsers browsing this forum: No registered users and 16 guests |