From 5edb5529bd346b7bb9814bf4e7f0df4d29bde3d0 Mon Sep 17 00:00:00 2001 From: Nicolas Boisselier Date: Thu, 7 Apr 2016 18:21:56 +0200 Subject: [PATCH] table filter for function sql --- lib/php/db.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/php/db.php b/lib/php/db.php index 41b6bebd..e62bb791 100644 --- a/lib/php/db.php +++ b/lib/php/db.php @@ -648,6 +648,11 @@ EOF; $this->pset('orderby',null); $this->pset('format','sql'); $r = array(); + + $tables = array(); + foreach (explode(',',self::p('table')) as $t) { + $tables[$t] = 1; + } #if (NB_EOL == "\n") echo '' @@ -667,6 +672,7 @@ EOF; # NB 03.04.16 } foreach ($this->tables() as $t) { + if ($tables and empty($tables[$t->name])) continue; if ($insert) { echo "\n-- Table: ".$t->name."\n"; #echo 'DROP TABLE IF EXISTS '.$t->sql_name().';'.NB_EOL; -- 2.47.3