On Tuesday, March 21, 2006 at 5:26:30 PM, [EMAIL PROTECTED] confabulated: > Duane Hill wrote: >> delete from bayes_token where id = (select id from bayes_vars >> where username = '[EMAIL PROTECTED]'); > ... >> delete from bayes_seen where id = (select id from bayes_vars where >> username = '[EMAIL PROTECTED]'); >> >> delete from bayes_expire where id = (select id from bayes_vars >> where username = '[EMAIL PROTECTED]'); >> >> delete from awl where username = (select username from bayes_vars >> where username = '[EMAIL PROTECTED]'); >> >> Then, finally removing the account from bayes_vars: >> >> delete from bayes_vars where username = '[EMAIL PROTECTED]'; >>
> Nitpick mode on: > Changing "id =" to "id in" will save you some errors in corner > cases where the username is no longer in bayes_vars... Noted... > delete from bayes_(token|seen|expire) where id in > (select id from bayes_vars where username = '[EMAIL PROTECTED]'); Cool! I haven't gotten too deep yet into MySQL. I knew there was a shorter way of doing this. Thanks for the tip! > The awl deletion can be simplified too: > delete from awl where username = '[EMAIL PROTECTED]'; Ahhh! I saw that as soon as I hit send. :-) -- "This message is made of 100% recycled electrons."