[Dbix-class] How to write this condition in DBIC?

Oleg Pronin syber.rus at gmail.com
Fri Oct 12 17:40:48 GMT 2007


>> my $cond =3D "lower(field)=3D$value";
>> $rs->search({}, { where =3D> \$cond });
Thanks for help, i'm an idiot :)

There will be an SQL-injection bug in this example, isn't that right?
I.e. $value has to be quoted manually ?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/dbix-class/attachments/20071012/667=
3ca09/attachment.htm


More information about the DBIx-Class mailing list