[Dbix-class] Multiple functions in WHERE clause

Jess Robinson castaway at desert-island.demon.co.uk
Wed Sep 20 14:39:13 CEST 2006


->search({}, { select => [ \'soundex(surname) = soundex(?)'] })
comes to mind.. (untested)

Jess


On Wed, 20 Sep 2006, Michael Gray wrote:

> On Tue, 19 Sep 2006, Michael Gray wrote:
>
>> Sorry, I'm going round in circles with this one.  How do I do a search
>> to result in:
>>
>>  select * from people where soundex(surname) = soundex(?);
>
> Answering my own question, this is easy with search_literal:
>
>  $rset->search_literal('soundex(surname) = soundex(?)', $who);
>
> But out of interest, can this be achieved with a search({}) spec??
>
> -- 
> Michael
>
> _______________________________________________
> List: http://lists.rawmode.org/cgi-bin/mailman/listinfo/dbix-class
> Wiki: http://dbix-class.shadowcatsystems.co.uk/
> IRC: irc.perl.org#dbix-class
> SVN: http://dev.catalyst.perl.org/repos/bast/trunk/DBIx-Class/
> Searchable Archive: http://www.mail-archive.com/dbix-class@lists.rawmode.org/
>
>



More information about the Dbix-class mailing list