[Dbix-class] now() - interval ? placeholder trouble

Bob MacCallum uncoolbob at gmail.com
Wed Sep 25 09:34:03 GMT 2013


Thanks guys - can't try the suggestions right now but I'm pretty sure
they will work!

On Wed, Sep 25, 2013 at 10:18 AM, Dmitry L. <dim0xff at gmail.com> wrote:
> Hello!
>
> I consider, that you should use it this way:
>
> $rs->search( { birth_time => { '<' => \["(now() - interval '1 hour')"] } } );
>
>
> On 25 September 2013 03:10, Bob MacCallum <uncoolbob at gmail.com> wrote:
>> Hello,
>>
>> I can't seem to (>1h banging head against wall) get this search
>> condition working
>>
>> $interval = '1 hour';
>> $rs->search(
>> {
>>  birth_time => { '<' => \[ "now() - interval ?", [interval => $interval] ] }
>> }
>> )->count
>>
>> Can anyone tell me what I'm doing wrong, please?
>>
>> For more, including the runtime error, please see
>> http://paste.scsys.co.uk/269786
>>
>> thanks!
>> Bob.
>>
>> _______________________________________________
>> List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class
>> IRC: irc.perl.org#dbix-class
>> SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/
>> Searchable Archive: http://www.grokbase.com/group/dbix-class@lists.scsys.co.uk
>
>
>
> --
> //wbr, Dmitry L.
>
> _______________________________________________
> List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class
> IRC: irc.perl.org#dbix-class
> SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/
> Searchable Archive: http://www.grokbase.com/group/dbix-class@lists.scsys.co.uk



More information about the DBIx-Class mailing list