this should non-"=" searches on fields that require SQL type binding...
authorivan <ivan>
Thu, 3 Jul 2008 04:12:14 +0000 (04:12 +0000)
committerivan <ivan>
Thu, 3 Jul 2008 04:12:14 +0000 (04:12 +0000)
FS/FS/Record.pm

index d085354..aef550d 100644 (file)
@@ -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 } );