summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorivan <ivan>2008-07-03 04:19:31 +0000
committerivan <ivan>2008-07-03 04:19:31 +0000
commita0b96a08ba89ce16d43eaa7391c438a0c9607cc9 (patch)
treebf5ab5013e8698d6484eb8c6488eeb3ece61c11f
parentdef33d88bcd8b002eebf025ceafd8a7479b31084 (diff)
should FINALLY get binding correctly in light of regression caused by get_real_fields refactor
-rw-r--r--FS/FS/Record.pm6
1 files changed, 3 insertions, 3 deletions
diff --git a/FS/FS/Record.pm b/FS/FS/Record.pm
index aef550d8a..b9fb2ae08 100644
--- a/FS/FS/Record.pm
+++ b/FS/FS/Record.pm
@@ -302,15 +302,15 @@ sub qsearch {
$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 } );
+ $sth->bind_param($bind++, $value, { TYPE => SQL_INTEGER } );
} elsif ( ( $type =~ /(numeric)/i && $value =~ /^[+-]?\d+(\.\d+)?$/)
|| ( $type =~ /(real|float4)/i
&& $value =~ /[-+]?\d*\.?\d+([eE][-+]?\d+)?/
)
) {
- $sth->bind_param($bind++, $record->{$field}, { TYPE => SQL_FLOAT } );
+ $sth->bind_param($bind++, $value, { TYPE => SQL_FLOAT } );
} else {
- $sth->bind_param($bind++, $record->{$field}, { TYPE => SQL_VARCHAR } );
+ $sth->bind_param($bind++, $value, { TYPE => SQL_VARCHAR } );
}
}