Re: Re: Foreign Keys Question
| From: | Micah Gersten | Date: | Fri, 12 Dec 2008 01:09:09 +0000 |
| Subject: | Re: Re: Foreign Keys Question | ||
| References: | 1 2 3 4 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-284515@lists.php.net to get a copy of this message | ||
Colin Guthrie wrote:
> The ON DELETE CASCADE option is key here... "DELETE FROM students
> where student_id=1" will remove all traces of that student from the
> db... all the course they've attended, all the instructors who have
> taught them etc. keeps things nice and tidy without having to put the
> structure in your code all over the place.
>
> Col
>
Why would you want to delete the instructors when deleting the student?
Thank you,
Micah Gersten
onShore Networks
Internal Developer
http://www.onshore.com