DBI question: binding params in HAVING clauses
David Cantrell
david at cantrell.org.uk
Fri Jan 27 14:32:18 GMT 2006
On Fri, Jan 27, 2006 at 02:25:38PM +0000, Andy Armstrong wrote:
> On 27 Jan 2006, at 13:58, David Cantrell wrote:
> > now I'm having to do ...
> > $val = $dbh->quote($val) if($val !~/^-?\d+(\.\d+)?$/);
> > and things are beginning to look really messy.
> Why can't you just wrap the quoting up in a subroutine? It shouldn't
> be duplicated surely?
I have done. All that does is move the mess. The code is still
unnecessarily complex and messy.
--
David Cantrell | London Perl Mongers Deputy Chief Heretic
More information about the london.pm
mailing list