DBI question: binding params in HAVING clauses
David Cantrell
david at cantrell.org.uk
Fri Jan 27 13:58:20 GMT 2006
On Thu, Jan 26, 2006 at 11:43:24AM -0500, Matt Sergeant wrote:
> $dbh->quote() is for strings.
Indeed. However, because of how I'm building my queries, I don't know
in advance which params are going to be strings and which are ints. So
now I'm having to do ...
$val = $dbh->quote($val) if($val !~/^-?\d+(\.\d+)?$/);
and things are beginning to look really messy. Not to mention that I
got the regex wrong twice. Which gets me back to wanting placeholders.
--
David Cantrell | top google result for "topless karaoke murders"
"Cynical" is a word used by the naive to describe the experienced.
George Hills, in uknot
More information about the london.pm
mailing list