projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
def33d8
)
should FINALLY get binding correctly in light of regression caused by get_real_fields...
author
ivan
<ivan>
Thu, 3 Jul 2008 04:19:31 +0000
(
04:19
+0000)
committer
ivan
<ivan>
Thu, 3 Jul 2008 04:19:31 +0000
(
04:19
+0000)
FS/FS/Record.pm
patch
|
blob
|
history
diff --git
a/FS/FS/Record.pm
b/FS/FS/Record.pm
index
aef550d
..
b9fb2ae
100644
(file)
--- 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+)?$/ ) {
$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+)?/
)
) {
} 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 {
} else {
- $sth->bind_param($bind++, $
record->{$field}
, { TYPE => SQL_VARCHAR } );
+ $sth->bind_param($bind++, $
value
, { TYPE => SQL_VARCHAR } );
}
}
}
}