Peraps a better option would be to have a users table and setup
referential integrity. Of course that would do no good for MyISAM, but
using that isn't really any better than using BDB, so...

On Tue, Mar 21, 2006 at 09:26:30AM -0800, [EMAIL PROTECTED] wrote:
> 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...
> 
> delete from bayes_(token|seen|expire) where id in
> (select id from bayes_vars where username = '[EMAIL PROTECTED]');
> 
> The awl deletion can be simplified too:
> delete from awl where username = '[EMAIL PROTECTED]';
> 
> -- 
> Matthew.van.Eerde (at) hbinc.com               805.964.4554 x902
> Hispanic Business Inc./HireDiversity.com       Software Engineer
> 

-- 
Jim C. Nasby, Database Architect                [EMAIL PROTECTED] 
Give your computer some brain candy! www.distributed.net Team #1828

Windows: "Where do you want to go today?"
Linux: "Where do you want to go tomorrow?"
FreeBSD: "Are you guys coming, or what?"

Reply via email to