Hi,
I am unsuccessfully trying to build a Where Clause in DBIx::Class.
The where clause should be:
WHERE status='Review' OR ( ( status='Offered' OR status='Denied' OR status='Cancelled' OR status='Conditional Offer') AND ( sent_email is NULL OR sent_email='0000-00-00') )
I was successful able to produce this Where Clause:
WHERE ( status='Offered' OR status='Denied' OR status='Cancelled' OR status='Conditional Offer') AND ( sent_email is NULL OR sent_email='0000-00-00');
using this snippet of code:
my @proc_requests = $schema->resultset( 'TblRequests' )->search({ -or => [ status => 'Offered', status => 'Denied', status => 'Cancelled', status => 'Conditional Offer', ], -and => [ -or => [ sent_email => {'!=', undef }, sent_email => {'!=', '0000-00-00'} +, ], ], });
All I need is to add is the outer OR for status = 'Review'. Any thoughts on how to
write a DBIx::Class where clause to produce the first Where Clause at the top?
Thanks
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: DBIx::Class Build a Where Clause with multiple ORs and ANDs
by 1nickt (Abbot) on Jan 03, 2018 at 13:40 UTC | |
by phildeman (Beadle) on Jan 03, 2018 at 16:30 UTC | |
Re: DBIx::Class Build a Where Clause with multiple ORs and ANDs
by poj (Monsignor) on Jan 03, 2018 at 08:32 UTC | |
by phildeman (Beadle) on Jan 03, 2018 at 15:34 UTC | |
by poj (Monsignor) on Jan 03, 2018 at 16:10 UTC | |
by 1nickt (Abbot) on Jan 03, 2018 at 15:55 UTC |
Back to
Seekers of Perl Wisdom