]> git.nbdom.net Git - nb.git/commitdiff
lib/php/db/field.php
authorDevops <sys@15gifts.com>
Thu, 6 Apr 2017 16:34:07 +0000 (17:34 +0100)
committerDevops <sys@15gifts.com>
Thu, 6 Apr 2017 16:34:07 +0000 (17:34 +0100)
lib/php/db/field.php
lib/php/db/table.php

index ba02cbf9a9c8c72e4db0e55dfa1ed48dea05c651..e1eae9e1072ffc103c40ee1587ac4b9e02b6607a 100644 (file)
@@ -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
index 6bf45de673c78f789b69875a3c5068c501c034b8..eb89fee75bac15db1cfc53aeeff5a42f0bfff14e 100644 (file)
@@ -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;