YES!
my $count_DossiersClos = database('asav')->quick_count(
            'DossierClos',
            {DateCloture => {
                gt => '2013-11-01 00:00:01',
                lt => '2013-12-01 00:00:01',
            }})

made good request in mysql
thanks  a lot !
T.


On Wed, Feb 12, 2014 at 5:58 PM, David Precious <davidp@preshweb.co.uk> wrote:
On Wed, 12 Feb 2014 17:19:08 +0100
Tonton <to.tonton@gmail.com> wrote:

> hello
>
> i write this in my sub
>
> my $count_DossiersClos = database('asav')->quick_count(
>             'DossierClos',
>             {DateCloture =>{ 'lt' => "2013-12-01
> 00:00:01"},DateCloture => { 'gt' => "2013-11-01 00:00:01"}});
>                 return $count_DossiersClos;
>
> but the query just use the last  Date cloture and in mysql.log i read

Yeah - it's a hashref and you're using the same key name twice, that
will never work.

I believe you can say:

{
    DateCloture => {
        gt => '2013-11-01 00:00:01',
        lt => '2013-12-01 00:00:01',
    },
}


Cheers

Dave P


--
David Precious ("bigpresh") <davidp@preshweb.co.uk>
http://www.preshweb.co.uk/     www.preshweb.co.uk/twitter
www.preshweb.co.uk/linkedin    www.preshweb.co.uk/facebook
www.preshweb.co.uk/cpan        www.preshweb.co.uk/github


_______________________________________________
dancer-users mailing list
dancer-users@dancer.pm
http://lists.preshweb.co.uk/mailman/listinfo/dancer-users