}
$orig_fields = array();
-$orig_status = array();
+$table_status = array();
if ($TABLE != "") {
$orig_fields = fields($TABLE);
- $orig_status = table_status($TABLE);
+ $table_status = table_status($TABLE);
+ if (!$table_status) {
+ $error = lang('No tables.');
+ }
}
$row = $_POST;
? " (" . implode(",", $partitions) . "\n)"
: ($row["partitions"] ? " PARTITIONS " . (+$row["partitions"]) : "")
);
- } elseif (support("partitioning") && ereg("partitioned", $orig_status["Create_options"])) {
+ } elseif (support("partitioning") && ereg("partitioned", $table_status["Create_options"])) {
$partitioning .= "\nREMOVE PARTITIONING";
}
($jush == "sqlite" && ($use_all_fields || $foreign) ? $all_fields : $fields),
$foreign,
$row["Comment"],
- ($row["Engine"] && $row["Engine"] != $orig_status["Engine"] ? $row["Engine"] : ""),
- ($row["Collation"] && $row["Collation"] != $orig_status["Collation"] ? $row["Collation"] : ""),
+ ($row["Engine"] && $row["Engine"] != $table_status["Engine"] ? $row["Engine"] : ""),
+ ($row["Collation"] && $row["Collation"] != $table_status["Collation"] ? $row["Collation"] : ""),
($row["Auto_increment"] != "" ? +$row["Auto_increment"] : ""),
$partitioning
));
);
if ($TABLE != "") {
- $row = $orig_status;
+ $row = $table_status;
$row["name"] = $TABLE;
$row["fields"] = array();
if (!$_GET["auto_increment"]) { // don't prefill by original Auto_increment for the sake of performance and not reusing deleted ids
}
}
-page_header(($TABLE != "" ? lang('Alter view') : lang('Create view')), $error, array("table" => $TABLE), $TABLE);
-
if (!$_POST && $TABLE != "") {
$row = view($TABLE);
$row["name"] = $TABLE;
+ if (!$error) {
+ $error = $connection->error;
+ }
}
+
+page_header(($TABLE != "" ? lang('Alter view') : lang('Create view')), $error, array("table" => $TABLE), $TABLE);
?>
<form action="" method="post">
Notify user about expired master password for permanent login
Send 404 for invalid database and schema
Fix title and links on invalid table pages
+Display error on invalid alter table and view pages
MySQL: Speed up updating rows without numeric or UTF-8 primary key
PostgreSQL: Fix detecting oid column in PDO
PostgreSQL: Handle timestamp types (bug #3614086)