mirror of
https://github.com/vrana/adminer.git
synced 2025-08-16 11:34:10 +02:00
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:
@@ -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));
|
||||
|
Reference in New Issue
Block a user