From fe37f0a03059f7ed46edea92913a4aab9d8a4989 Mon Sep 17 00:00:00 2001 From: Nicolas Boisselier Date: Sun, 25 Dec 2016 23:00:56 +0000 Subject: [PATCH] fix bug limit --- lib/php/db.php | 2 +- lib/php/db/table.php | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/php/db.php b/lib/php/db.php index 1d728740..ea6f62e4 100644 --- a/lib/php/db.php +++ b/lib/php/db.php @@ -122,7 +122,7 @@ class Db extends nb { public $format = 'json'; public $formats = [ 'table','div','csv','xml','json','yaml','sh','sql','php' ]; public $limits = ['20','50','100','500','1000']; - public $limit; + public $limit; # Here not in Table becouse of Db::out() # Classes public $out; diff --git a/lib/php/db/table.php b/lib/php/db/table.php index ddbd44fd..4f203022 100644 --- a/lib/php/db/table.php +++ b/lib/php/db/table.php @@ -887,9 +887,9 @@ Class Table extends nb { } public function rows(&$opt=[],$opt_by_val=null) { - if (empty($this->db()->limit)) { - $this->db()->limit = $this->db()->limits[0]; - } +# NB 25.12.16 if (empty($this->db()->limit)) { +# NB 25.12.16 $this->db()->limit = $this->db()->limits[0]; +# NB 25.12.16 } # # Run query -- 2.47.3