From: Nicolas Boisselier Date: Mon, 13 Apr 2015 23:26:05 +0000 (+0200) Subject: float X-Git-Url: https://git.nbdom.net/?a=commitdiff_plain;h=62f069096b63c3ae44cd9a34ecae0c68d4c35d3f;p=nb.git float --- diff --git a/lib/php/db.php b/lib/php/db.php index 67cb87b0..dea425d5 100644 --- a/lib/php/db.php +++ b/lib/php/db.php @@ -567,7 +567,7 @@ class table { if (!$spec['extra']) { if ($escape) $row[$f] = htmlspecialchars($row[$f]); } - if ($this->db->type == 'sqlite' and preg_match('/float\((?:\d+,)?(\d+)\)/',$spec['type'],$m)) { + if ($this->db->type == 'sqlite' and preg_match('/^float\((?:\d+,)?(\d+)\)/',$spec['type'],$m)) { $row[$f] = sprintf('%.'.$m[1].'f',$row[$f]); } /* only if in latin1