From: Nicolas Boisselier Date: Mon, 5 Sep 2016 16:02:01 +0000 (+0100) Subject: type.tables X-Git-Url: https://git.nbdom.net/?a=commitdiff_plain;h=2b599474908fad582078157f946d1ae10cde9eff;p=nb.git type.tables --- diff --git a/lib/php/db/types/sqlite.php b/lib/php/db/types/sqlite.php index 10b0ab8d..811cdc77 100644 --- a/lib/php/db/types/sqlite.php +++ b/lib/php/db/types/sqlite.php @@ -69,6 +69,7 @@ $DB_TYPES['sqlite'] = array ( 'tables' => function($Db) { # NB 03.09.16 # Handle attach mechnisum + #$Db->tables(); $dbs = $Db->databases(); $debug = 0;#$Db->p('db')=='all'; @@ -80,8 +81,9 @@ $DB_TYPES['sqlite'] = array ( $sql = ''; foreach ($dbs as $db) { $sql .= ($sql ? ' UNION ' : '').str_replace('sqlite_',$db['name'].'.sqlite_', + #"SELECT name as name,type FROM sqlite_master WHERE type IN('table','view') AND name NOT LIKE 'sqlite_%'" "SELECT '".$db['name'].".'||name as name,type FROM sqlite_master WHERE type IN('table','view') AND name NOT LIKE 'sqlite_%'" - ); + ); } if ($debug) debug($sql);