mirror of
https://github.com/postfixadmin/postfixadmin.git
synced 2024-09-19 11:12:15 +02:00
casting the date fields directly in the query
This commit is contained in:
parent
e0e2d006c5
commit
a75c0471fc
@ -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…
Reference in New Issue
Block a user