diff options
author | Brian Cully <bjc@kublai.com> | 2017-10-30 15:34:21 -0400 |
---|---|---|
committer | Brian Cully <bjc@kublai.com> | 2017-10-30 15:34:21 -0400 |
commit | 0964736afe66c066f8b77a54d77f27bdb8d24cd5 (patch) | |
tree | 5a39219a8f745b0a3b374e25d86c00bbde10fc77 /lib | |
parent | f887806c5989fc3e5c86107d6ff945a6fc63b05c (diff) | |
download | spamcat-0964736afe66c066f8b77a54d77f27bdb8d24cd5.tar.gz spamcat-0964736afe66c066f8b77a54d77f27bdb8d24cd5.zip |
Add get and set commands for tweaking counts.
Introduce 'get' to query a count for a given email address, and 'set'
to manually update it.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/SpamCat.pm | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/SpamCat.pm b/lib/SpamCat.pm index d470520..7a160cf 100644 --- a/lib/SpamCat.pm +++ b/lib/SpamCat.pm @@ -144,7 +144,7 @@ sub set_count_t { $q = 'INSERT INTO emails (count, sender) VALUES (?, ?)'; } else { # Otherwise update the record with the new count. - $q = 'UPDATE emails SET count = ? modified = CURRENT_TIMESTAMP WHERE sender = ?' + $q = 'UPDATE emails SET count = ?, modified = CURRENT_TIMESTAMP WHERE sender = ?' } my $sth = $self->{dbh}->prepare($q); $sth->execute($count, $sender); |