summaryrefslogtreecommitdiff
path: root/FS/FS/Record.pm
diff options
context:
space:
mode:
authorivan <ivan>2008-07-03 04:12:14 +0000
committerivan <ivan>2008-07-03 04:12:14 +0000
commitdef33d88bcd8b002eebf025ceafd8a7479b31084 (patch)
tree2d7ed6c7945e0fbdff6e2770790d8a4a064aa3f2 /FS/FS/Record.pm
parentce4e9317089b6e4e539a420734dc6a984bf14431 (diff)
this should non-"=" searches on fields that require SQL type binding...
Diffstat (limited to 'FS/FS/Record.pm')
-rw-r--r--FS/FS/Record.pm1
1 files changed, 1 insertions, 0 deletions
diff --git a/FS/FS/Record.pm b/FS/FS/Record.pm
index d085354..aef550d 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 } );