[Dbix-class] How do I use the value of a field in a where clause

Matt S Trout dbix-class at trout.me.uk
Tue Jan 2 13:10:41 GMT 2007


On 22 Dec 2006, at 13:18, Moritz Onken wrote:

> Hi,
>
> is it possible to do such a query?
> SELECT * from table where field1 = MD5(field2)
>
> field2 is not a string but a field in the table.

Literal chunk. { field1 => \'= MD5(field)' } c.f. SQL::Abstract docs
--  
Matt S Trout, Technical Director, Shadowcat Systems Ltd.
Offering custom development, consultancy and support contracts for  
Catalyst,
DBIx::Class and BAST. Contact mst (at) shadowcatsystems.co.uk for  
details.
+ Help us build a better perl ORM: http://dbix- 
class.shadowcatsystems.co.uk/ +





More information about the Dbix-class mailing list