23 Oct 2010, 1:27pm

leave a comment

MySQL Foreign Key Constraints & Cascade Delete

I’ve never actually used a foreign key constraint with cascading delete in a production environment, least not that I can remember.

But for GPS Log this is very useful, to enforce key constraints, and also make deleting users extremely easy!  Just 1 delete statement on the UserId and the DB takes care of the rest.

This is a great post on where to find the foreign key feature in phpMyAdmin

His SQL to help fix the cases which voliate the key constraint is extremely useful:

(where ‘agenda’ is the table with the foreign key constraint referencing ‘meetings’)

SELECT * FROM `agenda` LEFT OUTER JOIN meetings on
agenda.meeting_id=meetings.meeting_id WHERE
meetings.meeting_id is NULL;
*name

*e-mail

web site

leave a comment


 

free winrar download

free winrar download

winrar download free

winrar download free

windows 7 key generator

windows 7 key generator

windows 7 activation crack

windows7 activation crack

free winzip

free winzip

free winrar

free winrar

winzip free download

winzip free download

winrar free download

winrar free download

windows 7 crack

windows 7 crack

winzip free download full version

winzip free download full version

winzip activation code

winzip activation code

windows 7 product key

windows 7 product key
\n