in reply to Re: Perl DBI Mistaking a Number For a String
in thread Perl DBI Mistaking a Number For a String
I changed the code to use a bind_param and it seems to be working. This is what it looks like now:
It still seems a little odd that the code broke in this manner. Never the less, I appreciate the quick reply as this was a production problem and I was stuck. :)my $sh = $dbh->prepare("select * from records where date <= ? order by + date asc, time asc limit ?,10000") || die "Could not prepare select: " . $dbh->errstr; my $date = "2005-02-26"; my $n = 0; $sh->bind_param(1, $date, SQL_DATE); $sh->bind_param(2, $n, SQL_INTEGER); $sh->execute() || die "Could not execute select: " . $dbh->errstr;
Thanks,
|
|---|