From 8669bf4063b345a5fd3344296e47e7d50c48d5e7 Mon Sep 17 00:00:00 2001 From: Dominique Fournier Date: Sun, 15 Jul 2018 18:39:16 +0000 Subject: [PATCH] dblayeroo : listTables : sort the tables. Do not return the sqlite_sequence table git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@4291 bf3deb0d-5f1a-0410-827f-c0cc1f45334c --- dblayeroo.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/dblayeroo.php b/dblayeroo.php index 8674e46..9b1d9ef 100644 --- a/dblayeroo.php +++ b/dblayeroo.php @@ -269,7 +269,10 @@ class dblayeroo $st->execute (); $res = array (); while ($d = $st->fetch (\PDO::FETCH_ASSOC)) - $res[] = $d["name"]; + { + if ($d["name"] !== "sqlite_sequence") + $res[] = $d["name"]; + } break; case "mysql": $req = "SELECT TABLE_NAME @@ -295,7 +298,8 @@ class dblayeroo $this->DBException (dgettext ("domframework", "Unknown database driver in listTables")); } - return $res; + natsort ($res); + return array_values ($res); } /* }}} */