]> git.nbdom.net Git - nb.git/commitdiff
delete old comments
authorNicolas Boisselier <nicolas.boisselier@gmail.com>
Wed, 14 Dec 2022 19:36:59 +0000 (20:36 +0100)
committerNicolas Boisselier <nicolas.boisselier@gmail.com>
Wed, 14 Dec 2022 19:36:59 +0000 (20:36 +0100)
bin/shell-replace
lib/php/db/table.php

index cdc2f72aec46fce7845b29e4daf72502d9143016..801f65eb0b994812c2c5ba14cd67782ab033bbe8 100755 (executable)
@@ -25,7 +25,7 @@ my $SHELL_IGNORE = '^my \$SHELL_IGNORE';
 # ARGS
 #
 #################################################################################
-my $VERBOSE = $main::VERBOSE = 1;
+my $VERBOSE = $main::VERBOSE = 0;
 my $DEBUG = $main::DEBUG = 0;
 
 my %Opt = (
index e2d5c9a3070e8ba835d8f2cf6a0fa23722c989b0..1eb35f61fdb419ca1494e40fd9c6a40f86f7104e 100644 (file)
@@ -2115,29 +2115,6 @@ Class Table extends nb {
                $opt = [ 'count' => 1 ];
                $this->count = $this->db()->row($this->rows_sql($opt));
                return $this->count;
-# NB 04.02.18 
-# NB 04.02.18          if (isset($this->count)) return $this->count;
-# NB 04.02.18 
-# NB 04.02.18          $sql_count = $this->name;
-# NB 04.02.18 
-# NB 04.02.18          # We could use it instead of query, but wont be cached ! $this->create_temporary();
-# NB 04.02.18          if ($this->type == 'sql' and $this->name !== DB_TABLE_QUERY_NAME) {
-# NB 04.02.18                  if (!$this->sql) return;
-# NB 04.02.18 
-# NB 04.02.18                  $sql_count = "SELECT COUNT(*) FROM ($this->sql) _table_count" ;
-# NB 04.02.18 
-# NB 04.02.18          } elseif (preg_match('/^[\w_-]+$/',$sql_count)) {
-# NB 04.02.18                  $sql_count = "SELECT count(*) FROM ".$this->sql_name($sql_count);
-# NB 04.02.18 
-# NB 04.02.18          } else {
-# NB 04.02.18                  $sql_count = preg_replace('/ (ORDER|LIMIT) .*?$/s','',$sql_count);
-# NB 04.02.18                  $sql_count = preg_replace('/^SELECT .*FROM/s','SELECT count(*) FROM ',$sql_count);
-# NB 04.02.18 
-# NB 04.02.18          }
-# NB 04.02.18 
-# NB 04.02.18          $this->count = (int)$this->db()->row($sql_count);
-# NB 04.02.18          return $this->count;
-
        }
 
        public function err_sql($sql) {