Don't store empty parameters
git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@334 7c3ca157-0c34-0410-bff1-cbf682f78f5c
This commit is contained in:
parent
7ce79142c0
commit
06bd9700be
|
@ -14,7 +14,9 @@ if ($_POST && !$error && !$_POST["add"] && !$_POST["drop_col"]) {
|
||||||
$fields = array_filter((array) $_POST["fields"], 'strlen');
|
$fields = array_filter((array) $_POST["fields"], 'strlen');
|
||||||
ksort($fields);
|
ksort($fields);
|
||||||
foreach ($fields as $field) {
|
foreach ($fields as $field) {
|
||||||
$set[] = (in_array($field["inout"], $inout) ? "$field[inout] " : "") . idf_escape($field["field"]) . process_type($field, "CHARACTER SET");
|
if (strlen($field["field"])) {
|
||||||
|
$set[] = (in_array($field["inout"], $inout) ? "$field[inout] " : "") . idf_escape($field["field"]) . process_type($field, "CHARACTER SET");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if ($mysql->query(
|
if ($mysql->query(
|
||||||
"CREATE $routine " . idf_escape($_POST["name"])
|
"CREATE $routine " . idf_escape($_POST["name"])
|
||||||
|
|
Loading…
Reference in a new issue