From: Nicolas Boisselier Date: Mon, 8 Jan 2018 01:13:11 +0000 (+0000) Subject: lib/php/db.php X-Git-Url: https://git.nbdom.net/?a=commitdiff_plain;h=330aca8e90040035810a0512eef78315571b79fe;p=nb.git lib/php/db.php --- diff --git a/lib/php/db.php b/lib/php/db.php index 20b6226c..7e47ebeb 100644 --- a/lib/php/db.php +++ b/lib/php/db.php @@ -1072,7 +1072,8 @@ class Db extends nb { if ($insert and $t->type == 'table') { # NB 04.12.17: Use instead "cleaner" option db_type_from # NB 04.12.17 if ($type_from) $this->type = $type_from; - $t->rows($row_opt); + $o = $row_opt; + $t->rows($o); # NB 04.12.17 if ($type_to) $this->type = $type_to; } diff --git a/lib/php/db/table.php b/lib/php/db/table.php index e42903f1..ce33bf6b 100644 --- a/lib/php/db/table.php +++ b/lib/php/db/table.php @@ -923,7 +923,6 @@ Class Table extends nb { $sql = $count ? "SELECT count(*)" : "SELECT ".trim( $select_count[0].' '.join(',',$select_fields) ). $this->select_extras(); $sql .= " FROM ".$this->sql_name(); $sql .= $where; - #bye($sql); if ($this->p('orderby') and !$count) $sql .= ' ORDER BY '.$this->p('orderby'); @@ -1087,6 +1086,7 @@ Class Table extends nb { if (!$format) $this->bye("Parameter `format` missing!"); } +#debug($opt); list($sql,$where,$limit,$select_count) = $this->rows_sql($opt); $st = $this->db()->conn->prepare($sql);#,[PDO::ATTR_ERRMODE => PDO::ERRMODE_SILENT]); $st->execute();