Re: [CDBI] simplest way to do WHERE stuff

[prev] [thread] [next] [Date index for 2005/11/29]

From: Bill Moseley
Subject: Re: [CDBI] simplest way to do WHERE stuff
Date: 23:33 on 29 Nov 2005
On Tue, Nov 29, 2005 at 05:26:58PM -0600, Eamon Daly wrote:
> Quick question: I'm doing a lot of stuff like this with
> Class::DBI::AbstractSearch:
> 
> @i = My::Foo->search_where
>  ({ '-or' => [ 'foo' => 'x', 'bar' => 'x' ] });

My guess is you do this:

        $criteria->{-nest} = [ 
                foo => 'x',
                bar => 'y',
        ];

Here's what I do when searching in two fields:

        $criteria->{-nest} = [ 
                first_name => { -ilike => "%$search%" },
                last_name  => { -ilike => "%$search%" },
        ];

        -- 
        Bill Moseley
moseley@xxxx.xxx


_______________________________________________
ClassDBI mailing list
ClassDBI@xxxxx.xxxxxxxxxxxxxxxx.xxx
http://lists.digitalcraftsmen.net/mailman/listinfo/classdbi

(message missing)

[CDBI] simplest way to do WHERE stuff
James Nachlin 23:03 on 28 Nov 2005

Re: [CDBI] simplest way to do WHERE stuff
Kingsley Kerce 23:14 on 28 Nov 2005

Re: [CDBI] simplest way to do WHERE stuff
Bill Moseley 23:32 on 28 Nov 2005

Re: [CDBI] simplest way to do WHERE stuff
Peter Speltz 03:09 on 29 Nov 2005

Re: [CDBI] simplest way to do WHERE stuff
Matt S Trout 17:08 on 29 Nov 2005

Re: [CDBI] simplest way to do WHERE stuff
Peter Speltz 19:52 on 29 Nov 2005

Re: [CDBI] simplest way to do WHERE stuff
Mike Whitaker 20:01 on 29 Nov 2005

Re: [CDBI] simplest way to do WHERE stuff
Eamon Daly 23:26 on 29 Nov 2005

Re: [CDBI] simplest way to do WHERE stuff
Bill Moseley 23:33 on 29 Nov 2005

Re: [CDBI] simplest way to do WHERE stuff
Peter Speltz 21:57 on 29 Nov 2005

Generated at 14:51 on 01 Dec 2005 by mariachi v0.52