[Dbix-class] lower on column and query
Peter Edwards
peter at dragonstaff.com
Mon Mar 3 09:08:58 GMT 2008
>I found a solution equal to Jonathan's one which is :
>
>my $search = $c->req->param('extactmatch') ? 'search' :
>'search_like';
>$q = lc($q);
>my $rs = $c->model("DB::Dbentry")->$search({
>'lower('.$key.')' => $q },
I think you may need to escape an interpolated LHS variable like $key with
DBI::escape() or similar to avoid an SQL injection attack.
Regards, Peter
More information about the DBIx-Class
mailing list