Re: [CDBI] Help with multiple OR's.

Matt S Trout <dbix-class-uY5y5/[email protected]> Wed, 1 Aug 2007 10:13:50 +0100
Newsgroups gmane.comp.lang.perl.modules.class-dbi
Message-ID <[email protected]>
On Tue, Jul 31, 2007 at 11:44:21AM -0400, Jeff MacDonald wrote:
> Hi,
> 
> This is the query I'd like to perform.
> 
> SELECT * FROM foo WHERE enabled = 1 AND (desc = foo or name = foo)  
> AND (country = 1 or province = 9)
> 
> I'm trying to build up a $criteria hash to do so.
> 
> The problem I'm running to is the -or under the -and is a hash key  
> and of course has to be unique. So I can't make 2..

As noted in the docs, SQL::Abstract support is currently provided via the
DBIx::Class mailing list (which is also where you'll find me and the rest of
the ::Sweet authors these days)

-- 
      Matt S Trout       Need help with your Catalyst or DBIx::Class project?
   Technical Director    Want a managed development or deployment platform?
 Shadowcat Systems Ltd.  Contact mst (at) shadowcatsystems.co.uk for a quote
http://chainsawblues.vox.com/                    http://www.shadowcat.co.uk/