Browse Source

Merge pull request #819 from ntavares/replace_string-date-parsing-errors

casting the date fields directly in the query
pull/823/head
David Goodwin 2 years ago
committed by GitHub
parent
commit
53426ac148
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 2
      VIRTUAL_VACATION/vacation.pl

2
VIRTUAL_VACATION/vacation.pl

@ -393,7 +393,7 @@ sub replace_string {
my ($to) =@_;
my $logger = get_logger();
my $query = qq{SELECT body,activefrom,activeuntil FROM vacation WHERE email=? };
my $query = qq{SELECT body,DATE(activefrom),DATE(activeuntil) FROM vacation WHERE email=? };
my $stm = $dbh->prepare($query) or panic_prepare($query);
$stm->execute($to) or panic_execute($query,"email='$to'");
my @row = $stm->fetchrow_array;

Loading…
Cancel
Save