From 8366a4d660bd01b8907cc38172d685271f0dd199 Mon Sep 17 00:00:00 2001 From: Devops Date: Thu, 6 Apr 2017 17:34:07 +0100 Subject: [PATCH] lib/php/db/field.php --- lib/php/db/field.php | 1 + lib/php/db/table.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/php/db/field.php b/lib/php/db/field.php index ba02cbf9..e1eae9e1 100644 --- a/lib/php/db/field.php +++ b/lib/php/db/field.php @@ -62,6 +62,7 @@ class field extends nb { # See: http://www.w3schools.com/html/html_form_input_types.asp if (strpos($this->name,'password') !== false) return 'password" autocomplete="off'; if ($this->numeric() !== false) return 'number" step="any'; + if ($this->autoincrement) return 'text" readonly="readonly'; return 'text'; # Html5 only if (strpos($this->name,'email') !== false) return 'email'; # no safari diff --git a/lib/php/db/table.php b/lib/php/db/table.php index 6bf45de6..eb89fee7 100644 --- a/lib/php/db/table.php +++ b/lib/php/db/table.php @@ -502,7 +502,7 @@ Class Table extends nb { $where .= " LIMIT 1"; } - $fields = array_filter($fields,function($v){return empty($v->autoincrement);}); + #$fields = array_filter($fields,function($v){return empty($v->autoincrement);}); $sql = "SELECT *" . $this->select_extras(); $sql .= " FROM ".$this->sql_name().$where; -- 2.47.3