Re: Extending Class::DBI's search abilities

[prev] [thread] [next] [Date index for 2004/07/26]

From: Gabriel Horner
Subject: Re: Extending Class::DBI's search abilities
Date: 18:13 on 26 Jul 2004
On Mon, Jul 26, 2004 at 09:58:23AM +0100, Jack Challen wrote:
> 
> Hi,
> 
> I'm trying to make Class::DBI's searches a little more powerful (I want to 
> add regex-based searches with MySQL, and also to allow multiple 
> constraints on the same column - e.g. "Find me all foo where bar > 3 and 
> bar < 5").

Adding a regex-based search was one of the first things I did when starting to use Class::DBI.
Add this in your Class::DBI subclass:

sub search_regexp {shift->_do_search(REGEXP=>@_) }

Gabriel
        -- 
        my looovely website -- http://www.chwhat.com
BTW, IF chwhat.com goes down email me at gabriel.horner@xxxx.xx

Extending Class::DBI's search abilities
Jack Challen 08:58 on 26 Jul 2004

Re: Extending Class::DBI's search abilities
colm-cdbi 09:12 on 26 Jul 2004

Re: Extending Class::DBI's search abilities
Jack Challen 09:27 on 26 Jul 2004

Re: Extending Class::DBI's search abilities
Tony Bowden 10:29 on 26 Jul 2004

Re: Extending Class::DBI's search abilities
Gabriel Horner 18:13 on 26 Jul 2004

Generated at 11:35 on 01 Dec 2004 by mariachi v0.52