]> git.nbdom.net Git - nb.git/commitdiff
lib/php/db/table.php
authorroot <sys@15gifts.com>
Mon, 25 Sep 2017 21:22:59 +0000 (22:22 +0100)
committerroot <sys@15gifts.com>
Mon, 25 Sep 2017 21:22:59 +0000 (22:22 +0100)
lib/php/db/table.php

index e7b6bad9d18deb9ff293689985a20e7868735dd4..500a2354d0bc189d7fddf3bb3e327d4898af7de1 100644 (file)
@@ -364,6 +364,8 @@ Class Table extends nb {
 
       $conf = $this->unvar($this->db()->conf_type('table.fields',true));
       if (is_scalar($conf)) $conf = ['sql'=>$conf];
+      # NB 25.09.17: dirty fixed for sqlite4 attache db 
+      $conf['sql'] = preg_replace("/^PRAGMA table_info\('([^'\.]+)\./","PRAGMA ".'$1'.".table_info('",$conf['sql']);
       $rows = $this->db()->conn->query($conf['sql']);
 
       if (!is_object($rows)) {