Skip to content

Commit

Permalink
Merge pull request #819 from ntavares/replace_string-date-parsing-errors
Browse files Browse the repository at this point in the history
casting the date fields directly in the query
  • Loading branch information
DavidGoodwin committed Apr 12, 2024
2 parents e0e2d00 + a75c047 commit 53426ac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion VIRTUAL_VACATION/vacation.pl
Expand Up @@ -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;
Expand Down

0 comments on commit 53426ac

Please sign in to comment.