Yeah, that's gonna need to be -or => [ ... ]
And I don't think the -and is needed. On Aug 10, 2009 8:58 PM, "Rob Kinyon" <[email protected]> wrote: On Mon, Aug 10, 2009 at 19:42, Eric Wee<[email protected]> wrote: > $c->model(DB::Client)->searc... This should do the trick. Peter will chime in with corrections as needed. ->search({ is_retail => '1', enabled_date => { '!=' => undef }, enabled_date => { '<' => \'NOW()' }, -and => { -or => { disabled_date => undef, disabled_date => { '<' => 'enabled_date' }, disabled_date => { '>' => \'NOW()', } }, }, }); The scalarref is important for NOW() otherwise it won't work. Rob _______________________________________________ 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/[email protected]
_______________________________________________ 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/[email protected]
