Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^2: Perl DBI Mistaking a Number For a String

by {NULE} (Hermit)
on Apr 21, 2005 at 14:03 UTC ( [id://449995]=note: print w/replies, xml ) Need Help??


in reply to Re: Perl DBI Mistaking a Number For a String
in thread Perl DBI Mistaking a Number For a String

Hi again,

I changed the code to use a bind_param and it seems to be working. This is what it looks like now:

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;
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. :)

Thanks,

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://449995]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (7)
As of 2024-04-18 11:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found