From: ivan Date: Thu, 3 Jul 2008 04:12:14 +0000 (+0000) Subject: this should non-"=" searches on fields that require SQL type binding... X-Git-Tag: root_of_webpay_support~510 X-Git-Url: http://git.freeside.biz/gitweb/?a=commitdiff_plain;h=def33d88bcd8b002eebf025ceafd8a7479b31084;p=freeside.git this should non-"=" searches on fields that require SQL type binding... --- diff --git a/FS/FS/Record.pm b/FS/FS/Record.pm index d085354ed..aef550d8a 100644 --- a/FS/FS/Record.pm +++ b/FS/FS/Record.pm @@ -299,6 +299,7 @@ sub qsearch { grep defined( $record->{$_} ) && $record->{$_} ne '', @real_fields ) { my $value = $record->{$field}; + $value = $value->{'value'} if ref($value); my $type = dbdef->table($table)->column($field)->type; if ( $type =~ /(int|(big)?serial)/i && $value =~ /^\d+(\.\d+)?$/ ) { $sth->bind_param($bind++, $record->{$field}, { TYPE => SQL_INTEGER } );