Posted on 2005-04-15 09:25:10-07 by zby in response to 321
Re: SQL functions in WHERE clause
Here is a patch against the version:
$Id: Abstract.pm,v 1.17 2004/08/25 20:11:27 nwiger Exp $
diff Abstract.pm Abstract.pm.orig 577,582c577 < if ($k eq 'clause'){ < use Data::Dumper; < print Dumper($v); < push @sqlf, $v->{clause}; < push @sqlv, @{$v->{binds}}; < }elsif (! defined($v)) { --- > if (! defined($v)) {
It allowes to do
my $sqlparams; $sqlparams->{clause} = { clause => 'name @@ ?', binds => [1]}; my($where, @bind) = $sql->where($sqlparams, ['name'], 10, 10);
But it takes the 'clause' key as special.
Direct Responses: Write a response
Perl Weekly newsletter
A free weekly newsletter for people who are busy to read all the blogs. click here to check it out.