1 2
$TZ = $dbh->quote($TZ); $STH = $DBH->prepare("SELECT DATE + INTERVAL $TZ HOUR FROM forum");
1
2
3
4
5
my $DBH = DBI->connect_cached("DBI:mysql:myweb", '', '', {RaiseError => 1, PrintError => 0});
my $STH = $DBH->prepare("SELECT DATE + INTERVAL ? HOUR AS date FROM forum ORDER BY 1 DESC");
$STH->execute(2);
my $r = $STH->fetchall_arrayref({});
print Dumper $r;