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
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
1 additions and
1 deletions
-
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; |
|
|
|
|