Use NULL for empty auto_increment (bug #1768966)
git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@307 7c3ca157-0c34-0410-bff1-cbf682f78f5c
This commit is contained in:
parent
130009e5b8
commit
aa636bb817
|
@ -42,7 +42,7 @@ function process_input($name, $field) {
|
|||
global $mysql;
|
||||
$name = bracket_escape($name);
|
||||
$value = $_POST["fields"][$name];
|
||||
if ($field["type"] != "enum" ? $_POST["null"][$name] : !strlen($value)) {
|
||||
if ($field["type"] != "enum" && !$field["auto_increment"] ? $_POST["null"][$name] : !strlen($value)) {
|
||||
return "NULL";
|
||||
} elseif ($field["type"] == "enum") {
|
||||
return (isset($_GET["default"]) ? "'" . $mysql->escape_string($value) . "'" : intval($value));
|
||||
|
|
Loading…
Reference in a new issue