From: Nicolas Boisselier Date: Wed, 14 Dec 2022 19:36:59 +0000 (+0100) Subject: delete old comments X-Git-Url: https://git.nbdom.net/?a=commitdiff_plain;h=78db73a6e965826c50e6fadb2d192cc26621eeae;p=nb.git delete old comments --- diff --git a/bin/shell-replace b/bin/shell-replace index cdc2f72a..801f65eb 100755 --- a/bin/shell-replace +++ b/bin/shell-replace @@ -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 = ( diff --git a/lib/php/db/table.php b/lib/php/db/table.php index e2d5c9a3..1eb35f61 100644 --- a/lib/php/db/table.php +++ b/lib/php/db/table.php @@ -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) {