From 6cd97463143e9d872fac7fa79b6cb18e7dec3ebf Mon Sep 17 00:00:00 2001 From: Nicolas Boisselier Date: Sat, 26 May 2018 13:04:04 +0100 Subject: [PATCH] www/dbq/dbq.php --- lib/php/db/table.php | 4 ++-- www/dbq/dbq.php | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/php/db/table.php b/lib/php/db/table.php index 4c803488..49e7f998 100644 --- a/lib/php/db/table.php +++ b/lib/php/db/table.php @@ -522,7 +522,7 @@ Class Table extends nb { return html_edit($values,$form_action,true); } - private function _html_edit_sql($values = null,&$add=false) { + public function html_edit_sql($values = null,&$add=false) { $where = $this->where($this->fields(),$values); if (empty($where)) { $where = ' WHERE 1=0'; @@ -548,7 +548,7 @@ Class Table extends nb { if (!$add) { if (!$fct) { $fct = function (&$table,&$values) use ($add) { - $sql = $table->_html_edit_sql($values,$add); + $sql = $table->html_edit_sql($values,$add); $st = $table->db()->conn->prepare($sql); $st->execute(); $row = $st->fetch(PDO::FETCH_ASSOC, PDO::FETCH_ORI_NEXT); diff --git a/www/dbq/dbq.php b/www/dbq/dbq.php index 0b4002af..10b34b34 100644 --- a/www/dbq/dbq.php +++ b/www/dbq/dbq.php @@ -454,7 +454,8 @@ class DbQ extends nb { # Handle format for /vi if ($this->params['format'] != $this->format_html) { - $row = $this->db->query2h($this->table->sql_edit($values)); + #debug($values); + $row = $this->db->query2h($this->table->html_edit_sql($values)); if ($fields) { foreach ($row as $k=>$v) { if (!in_array($k,$fields)) unset($row[$k]); -- 2.47.3