curdate() works if $edate is embedded directly in my sql statement, but not as a bind variable. $bdate works fine.
my $bdate = $q->param('bdate') || '%';
my $edate = $q->param('edate') || 'curdate()';
my $sql = "create table $temp_tbl
(date date,
uid varchar(14))
engine = memory
select date,
? as uid
from calendar
where date between ? and $edate";
my $sth = $dbh->prepare($sql);
$sth->execute($uid, $bdate) || die $sth->errstr();
It's mostly just irritating.
Am I doing something wrong?
Thanks,
Jon
