From: Antony C. <an...@sm...> - 2006-11-23 12:52:48
|
MySql does...and don't even mention M$! http://dev.mysql.com/doc/refman/5.0/en/innodb-foreign-key- constraints.html On 23 Nov 2006, at 12:48, Adam Marshall wrote: > ON DELETE CASCADE doesn't work with MySQL and MS SQLServer, what would > you > do about those DB's? > > adam > > | -----Original Message----- > | From: bod...@li... > | [mailto:bod...@li...] On > Behalf Of > | Antony Corfield > | Sent: 23 November 2006 12:39 > | To: bod...@li... > | Subject: [Bodington-developers] Deleting users > | > | Hi All, > | > | We've had a few problems with unwanted users (users with wrong > username > | or more than 1 username etc.) in the bodington DB but as you know > | deleting users is a pain. This is because there are 18 tables that > | reference the users table via foreign key constraint. So I've > attached > | an sql script (bodington v 2.8) that will alter these constraints to > | allow ON DELETE CASCADE, then all you need to remove a user, given > | their username, is the following: > | > | delete from users where user_id in (select user_id from pass_phrases > | where user_name='username'); > | > | Some people might feel this is dangerous and object to living on the > | edge but we on Skye encounter the severities of life on a daily > basis, > | especially those with an office next to Alistair! > | > | Any comments? > | > | Antony > > > ----------------------------------------------------------------------- > -- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to > share your > opinions on IT & business topics through brief surveys - and earn cash > http://www.techsay.com/default.php? > page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > Bodington-developers mailing list > Bod...@li... > https://lists.sourceforge.net/lists/listinfo/bodington-developers |