[Dbix-class] How do I use stored Procedures in where-clause?

Jess Robinson castaway at desert-island.demon.co.uk
Sat Dec 23 19:50:21 GMT 2006



On Fri, 22 Dec 2006, Moritz Onken wrote:

> Hi,
>
> i want to use a statement with the MD5-function in the where clause.
>
> Like
> SELECT * from table where password = MD5('secret')

->search({ -and => \'password = MD5(?)'}, { bind => ['secret'] });

or substitute "me.fieldname" to use a field instead of a value, and drop 
the bind.

> DBIx::Class::Manual:: Cookbook had no answer on that.

Yup, it probably should have.. would also be nice if the where handled it 
like select does.. e.g. password => { MD5 => 'secret'} ..

Jess



More information about the Dbix-class mailing list