From: Devops Date: Thu, 6 Apr 2017 16:34:07 +0000 (+0100) Subject: lib/php/db/field.php X-Git-Url: https://git.nbdom.net/?a=commitdiff_plain;h=8366a4d660bd01b8907cc38172d685271f0dd199;p=nb.git lib/php/db/field.php --- 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;