From 0964736afe66c066f8b77a54d77f27bdb8d24cd5 Mon Sep 17 00:00:00 2001 From: Brian Cully Date: Mon, 30 Oct 2017 15:34:21 -0400 Subject: 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. --- lib/SpamCat.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') 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); -- cgit v1.2.3