From: Nicolas Boisselier Date: Thu, 29 Dec 2016 16:22:21 +0000 (+0100) Subject: fix bug table already exists X-Git-Url: https://git.nbdom.net/?a=commitdiff_plain;h=5c40fff95805eaa6cbbf3ebcb1a86a47736b3af9;p=nb.git fix bug table already exists --- diff --git a/lib/php/db/table.php b/lib/php/db/table.php index 5c5fd31a..e4c9c39a 100644 --- a/lib/php/db/table.php +++ b/lib/php/db/table.php @@ -128,7 +128,7 @@ Class Table extends nb { // Virtual Table } elseif (DB_TABLE_QUERY_NAME and !empty($this->sql)) { - if ($this->name) $this->name = DB_TABLE_QUERY_NAME; +# NB 29.12.16 table already exists !!! if ($this->name) $this->name = DB_TABLE_QUERY_NAME; $this->db()->conn->query("CREATE TEMPORARY TABLE $this->name AS $this->sql"); } elseif (preg_match('/\b(\.import|LOAD DATA|COPY|INSERT|REPLACE|DELETE|TRUNCATE|CREATE|DROP|ALERT)\b/',$this->name)) {