DBI question: binding params in HAVING clauses
captvanhalen at gmail.com
Thu Jan 26 15:01:12 GMT 2006
On 1/25/06, David Cantrell <david at cantrell.org.uk> wrote:
> > > And do you have a solution?
> > Use sprintf.
> Use sprintf in what manner?
my $sql = sprintf('
SELECT COUNT(actors.name), countries.name
FROM actorsXcountries, countries, actors
WHERE actors.id = actorsXcountries.actorid AND
countries.id = actorsXcountries.countryid
GROUP BY countries.name
HAVING COUNT(actors.name) < %d
ORDER BY COUNT(actors.name)
More information about the london.pm