>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
_______________________________________________
List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/
Searchable Archive: http://www.grokbase.com/group/[EMAIL PROTECTED]