[Dbix-class] Constructing "WHERE" clause in DBIx

Peter Rabbitson rabbit+dbic at rabbit.us
Mon Aug 10 07:48:06 GMT 2009


Eric Wee wrote:
> Hi there,
> 
>  
> 
> I’m trying to construct the following “where” clause in DBIx but not
> sure how to do so.
> 
>  
> 
> WHERE
> 
>             is_retail = '1'
> 
>             AND enabled_date is not null
> 
>             AND enabled_date < now()
> 
>             AND (disabled_date is null
> 
>                         OR disabled_date < enabled_date
> 
>                         OR disabled_date > now())
> 
>  
> 

Show us what you've tried so far.



More information about the DBIx-Class mailing list