DBI question: binding params in HAVING clauses

Andy Armstrong andy at hexten.net
Thu Jan 26 16:53:14 GMT 2006

On 26 Jan 2006, at 16:43, Matt Sergeant wrote:
>> What's the point of $dbh->quote() when %d can only expand to an  
>> integer anyway? Or rather what's the point of using sprintf()?
> It ensures that whatever you're using is an integer. It's a type  
> safety thing.
> $dbh->quote() is for strings.

I understand what's being attempted. I imagine either sprintf() or  
$dbh->quote() would work correctly (certainly many SQL dialects don't  
mind numbers being quoted - I don't know if that's true here) but it  
certainly won't work with both.

Andy Armstrong, hexten.net

More information about the london.pm mailing list