* This is the modus mailing list * Be sure to give your SpamCount an initial integer value instead of null. null + 1 = null
- Del > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf > Of Lapo Nustrini > Sent: Wednesday, November 12, 2003 2:33 PM > To: [EMAIL PROTECTED] > Subject: [Modus] Spam counter on a website? > > * This is the modus mailing list * > > Hello John, > > thanks for the instructions. I just tried implementing them, but I > can't get it to work. > > I setup the new table (tblCounter) > Created a new Field (SpamCount, int, Null) > And created the Trigger on tblMsgCatalog. (If I try to edit the trigger > in Query Analyzer, I get the following text to edit: > > ALTER TRIGGER [SpamCounter] ON [dbo].[tblMsgCatalog] > FOR INSERT > AS > Update tblCounter > set SpamCount = SpamCount + 1 > > This appears correct to me, however, nothing is happening. > I think there may be something wrong with the table itself, as if I > simply run: > > Update tblCounter > set SpamCount = SpamCount + 1 > > I get a "(0 row(s) affected)" response. > > Do you have any idea what I may have done wrong? > > Thanks, > > Lapo > > > On Wednesday, November 12, 2003, at 11:44 AM, ISOC Network Operations > wrote: > > > * This is the modus mailing list * > > > > Yup, read my other post, that is exactly what I am doing. > > > > John > > > > -----Original Message----- > > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On > > Behalf Of Lapo Nustrini > > Sent: Wednesday, November 12, 2003 2:32 PM > > To: [EMAIL PROTECTED] > > Subject: [Modus] Spam counter on a website? > > > > * This is the modus mailing list * > > > > My initial thought was that it would be simplest to setup the counter > > in the SQL database itself, and increment it each time a message is > > quarantined. > > A simple query could then be run to check the counter, without actually > > counting the number of records. > > > > This would also show the total number of messages caught, rather than > > what is currently in the quarantine. > > > > However, I really don't know much about MS SQL, so there may be a > > better idea. > > (I also don't know how to accomplish this. Probably something to do > > with triggers...) > > > > Thanks, > > Lapo > > > > > > On Wednesday, November 12, 2003, at 11:15 AM, Darryl Dunkin wrote: > > > >> * This is the modus mailing list * > >> > >> I've considered doing this also, but have not had an accurate way to > > do > >> it. The SQLDB only stores the quarantine, so a simple count of your > >> current spam quarantine is: > >> > >> select count(*) from tblMsgCatalog where msgtype = 2 > >> > >> This counter doesn't change much depending on your expiry, as I keep 7 > >> days worth, I keep around 100k messages. This should match up with > > what > >> you see in the console. > >> > >> It may be more reasonable to parse out the stats logfile over a period > >> of time instead, although I have not looked into it yet. I am not sure > >> how rebooting or restarting the services effects these numbers. > >> > >> -----Original Message----- > >> From: Lapo Nustrini [mailto:[EMAIL PROTECTED] > >> Sent: Wednesday, November 12, 2003 11:08 > >> To: [EMAIL PROTECTED] > >> Subject: [Modus] Spam counter on a website? > >> > >> * This is the modus mailing list * > >> > >> > >> I'd like to setup a (live) counter on our website, showing how much > >> spam > >> has been stopped. > >> However, I'm not sure what the best way to get the data from the SQL > >> quarantine is. > >> > >> Any suggestions or examples? > >> > >> > >> Thanks, > >> > >> Lapo Nustrini > >> > >> Seanet Corporation > >> > >> 701 Fifth Ave, Suite 6801 > >> Seattle > >> 98104 WA > >> (206) 343 7828 > >> http://www.seanet.com > >> > >> > >> ** > >> To unsubscribe, send an Email to: [EMAIL PROTECTED] with the > >> word > >> "UNSUBSCRIBE" in the body or subject line. > >> > >> ** > >> To unsubscribe, send an Email to: [EMAIL PROTECTED] > >> with the word "UNSUBSCRIBE" in the body or subject line. > >> > > > > > > ** > > To unsubscribe, send an Email to: [EMAIL PROTECTED] > > with the word "UNSUBSCRIBE" in the body or subject line. > > > > > > ** > > To unsubscribe, send an Email to: [EMAIL PROTECTED] > > with the word "UNSUBSCRIBE" in the body or subject line. > > > > > ** > To unsubscribe, send an Email to: [EMAIL PROTECTED] > with the word "UNSUBSCRIBE" in the body or subject line. ** To unsubscribe, send an Email to: [EMAIL PROTECTED] with the word "UNSUBSCRIBE" in the body or subject line.
