mirror of
https://github.com/dg/dibi.git
synced 2025-08-05 13:47:33 +02:00
DibiTranslator: number of decimal points changed to 10
This commit is contained in:
@@ -364,7 +364,7 @@ final class DibiTranslator extends DibiObject
|
|||||||
if (is_string($value) && is_numeric($value) && strpos($value, 'x') === FALSE) {
|
if (is_string($value) && is_numeric($value) && strpos($value, 'x') === FALSE) {
|
||||||
return $value; // something like -9E-005 is accepted by SQL, HEX values are not
|
return $value; // something like -9E-005 is accepted by SQL, HEX values are not
|
||||||
} else {
|
} else {
|
||||||
return $value === NULL ? 'NULL' : rtrim(rtrim(number_format($value + 0, 20, '.', ''), '0'), '.');
|
return $value === NULL ? 'NULL' : rtrim(rtrim(number_format($value + 0, 10, '.', ''), '0'), '.');
|
||||||
}
|
}
|
||||||
|
|
||||||
case 'd': // date
|
case 'd': // date
|
||||||
@@ -436,7 +436,7 @@ final class DibiTranslator extends DibiObject
|
|||||||
return (string) $value;
|
return (string) $value;
|
||||||
|
|
||||||
} elseif (is_float($value)) {
|
} elseif (is_float($value)) {
|
||||||
return rtrim(rtrim(number_format($value, 20, '.', ''), '0'), '.');
|
return rtrim(rtrim(number_format($value, 10, '.', ''), '0'), '.');
|
||||||
|
|
||||||
} elseif (is_bool($value)) {
|
} elseif (is_bool($value)) {
|
||||||
return $this->driver->escape($value, dibi::BOOL);
|
return $this->driver->escape($value, dibi::BOOL);
|
||||||
|
Reference in New Issue
Block a user