]> git.nbdom.net Git - nb.git/commitdiff
lib/php/db/table.php
authorroot <sys@15gifts.com>
Mon, 7 Aug 2017 23:30:09 +0000 (00:30 +0100)
committerroot <sys@15gifts.com>
Mon, 7 Aug 2017 23:30:09 +0000 (00:30 +0100)
lib/php/db/table.php

index 2f376b4f5d671f4aec8cf06ae78c353d11ccd78c..4184b43a57066a788b7af2cad57fe8c54bf1b127 100644 (file)
@@ -2107,7 +2107,7 @@ Class Table extends nb {
 
         $this->create_temporary();
         $sql = $this->db()->method('tables');
-        if (!self::p('count')) $sql .= " LIMIT 0";
+        if (!$this->p('count')) $sql .= " LIMIT 0";
         $sql = "SELECT * FROM ($sql) t WHERE name=".$this->db()->quote($this->name);
 
         $sth = $this->db()->conn->query($sql,PDO::FETCH_ASSOC);
@@ -2122,7 +2122,6 @@ Class Table extends nb {
         'name',
         'type',
       ] as $k) {
-# NB 28.10.16         if (!empty($this->$k) and empty($this->status[$k])) $this->status[$k] = $this->$k;
         if (!empty($this->$k)) $this->status[$k] = $this->$k;
       }
 
@@ -2145,9 +2144,11 @@ Class Table extends nb {
 # NB 08.08.17       if (!empty($this->status[$k])) continue;
 
       if (empty($key)) {
-        if (!self::p($k)) continue;
+        if (!$this->p($k)) continue;
+
       } elseif(is_array($key)) {
         if (!in_array($k,$key)) continue;
+
       } else {
         if ($k!=$key) continue;
       }