From: Nicolas Boisselier Date: Fri, 22 Apr 2016 08:43:15 +0000 (+0100) Subject: wp table X-Git-Url: https://git.nbdom.net/?a=commitdiff_plain;h=e49820ba4c87c85b4cfbfd579d82e388aa559e2e;p=nb.git wp table --- diff --git a/lib/php/db/table.php b/lib/php/db/table.php index 26a6c07e..f876512a 100644 --- a/lib/php/db/table.php +++ b/lib/php/db/table.php @@ -770,8 +770,8 @@ Class Table extends nb { return; } - $opt['count'] = $count; - $opt['limit'] = $limit; + $this->count = $opt['count'] = $count; + $this->limit = $opt['limit'] = $limit; if ($opt['is_html'] or $format=='wp') { @@ -801,15 +801,11 @@ Class Table extends nb { if (!$query) $this->err_sql($sql); $tot = $query->fetch(PDO::FETCH_COLUMN); - $opt['tot'] = $tot; + $this->tot = $opt['tot'] = $tot; #if (!$tot) return; } # < is_html - $this->tot = $opt['tot']; - $this->count = $opt['count']; - $this->limit = $opt['limit']; - if ($count === 0 and $this->p('header') === 'force') { echo $this->{"rows_begin_$format"}($this->fields()); }