]> git.nbdom.net Git - nb.git/commitdiff
float
authorNicolas Boisselier <nicolas.boisselier@gmail.com>
Mon, 13 Apr 2015 23:26:05 +0000 (01:26 +0200)
committerNicolas Boisselier <nicolas.boisselier@gmail.com>
Mon, 13 Apr 2015 23:26:05 +0000 (01:26 +0200)
lib/php/db.php

index 67cb87b0c66021c4d6693b4bca1a33e648a1c3a3..dea425d592bf650c731427f9b6956b9be04d8e5e 100644 (file)
@@ -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