[Dbix-class] Writing a query with a BETWEEN in the WHERE clause and the to_date(function)

Karen Hoofnagle karen at hoofnagle.org
Mon Sep 21 16:41:21 GMT 2009


No, I saw it. But I appear to be implementing what I'm reading  
incorrectly.
Which is why I asked for help.

On Sep 21, 2009, at 12:26 PM, Joel Bernstein wrote:

> 2009/9/21 Karen Hoofnagle <karen at hoofnagle.org>:
>> I need to create the following query using DBIx:Class (assume I'm  
>> using the
>> most recent release of DBIx::Class)
>> select * from user_read_log where datetime between to_date(20090101,
>> 'YYYYMMDD') and to_date(20091001, 'YYYYMMDD')
>
> I think you said you've looked here, but I guess you didn't see this  
> section:
>
> http://search.cpan.org/~ribasushi/SQL-Abstract-1.58/lib/SQL/Abstract.pm#Special_operators_ 
> :_IN,_BETWEEN,_etc.
>
> /joel
>
> _______________________________________________
> 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