]> git.nbdom.net Git - nb.git/commitdiff
lib/php/db.php
authorNicolas Boisselier <nicolas.boisselier@gmail.com>
Mon, 8 Jan 2018 01:13:11 +0000 (01:13 +0000)
committerNicolas Boisselier <nicolas.boisselier@gmail.com>
Mon, 8 Jan 2018 01:13:11 +0000 (01:13 +0000)
lib/php/db.php
lib/php/db/table.php

index 20b6226ca3ad954218c17cef09a32dcf13155c63..7e47ebeb5dcf688b1661c96f2e47d42afe9310fe 100644 (file)
@@ -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;
       }
 
index e42903f1dc061faa600e204f3d2e26139d53431a..ce33bf6bccd592c096a228a44271e8a31f95d396 100644 (file)
@@ -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();