[Dbix-class] DBIx HAVING and COUNT error
Dagfinn Ilmari Mannsåker
ilmari at ilmari.org
Tue Sep 6 09:01:22 GMT 2016
Len Jaffe <lenjaffe at jaffesystems.com> writes:
> On Sun, Sep 4, 2016 at 11:13 PM, Rajeev Prasad <rp.neuli at yahoo.com> wrote:
>
>> having => { 'count 1' => $tCount },
>
> having => { 'count(1)' => $tCount },
That breaks if you enable name quoting, as the hash keys are interpreted
as column names. You can use the arrayrefref syntax for arbitrary SQL
with placeholders:
having => \['count(1) = ?', $tCount ],
--
"The surreality of the universe tends towards a maximum" -- Skud's Law
"Never formulate a law or axiom that you're not prepared to live with
the consequences of." -- Skud's Meta-Law
More information about the DBIx-Class
mailing list