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';
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);
# 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]);