Hallo Mark,

> It does seem to be a somewhat unhappy tool :)  If you ask it for help,
> it barfs in a nasty way.  I can send that output along too if you'd like
> that as well.
> 
I am going to fix that. I must!


> Absolutely acceptable.
> 
I am a bit in a rush right now so I am going to send you a SQL clause that does 
something like dspam_merge but not exactly what dspam_merge does. dspam_merge 
is able to merge the tokens from USER1 into the tokens of USER2. The SQL clause 
from here will merge tokens from USER1, USER2, USERx into a new user USERy.

Assuming:
 - USERy has uid 2000
 - USER1 has uid 1
 - USER2 has uid 2
 - USERx has uid 3

Then you should first drop all the tokens for USERy:
DELETE FROM dspam_token_data WHERE uid=2000;

And then you can use one SQL clause to merge the tokens from USER1, USER2 and 
USERx into USERy:

INSERT INTO dspam_token_data (uid,token,spam_hits,innocent_hits,last_hit) 
SELECT 2000,token,SUM(spam_hits),SUM(innocent_hits),MAX(last_hit) FROM 
dspam_token_data WHERE uid IN (1,2,3) GROUP BY token;

To be 100% like dspam_merge I would need to do "ON DUPLICATE" but right now I 
can't test that since I am on the run and I don't want to send you something 
non working. But I will quickly do the stuff over the weekend and send it here. 
I have to look if I can glue everything into SQL or if I need to make a quick 
script? Anyway... I will send the script here to the list. Just give me the 
weekend to look at it.


> pace
>
Steve
-- 
GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT!
Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01

------------------------------------------------------------------------------
_______________________________________________
Dspam-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dspam-user

Reply via email to