query("SHOW COLUMNS FROM " . idf_escape($_GET["table"])); if (!$result) { $error = h($dbh->error); } $table_status = ($result ? table_status($_GET["table"]) : array()); $is_view = !isset($table_status["Rows"]); page_header(($result && $is_view ? lang('View') : lang('Table')) . ": " . h($_GET["table"]), $error); if ($result) { $auto_increment_only = true; echo "
" . h($row["Field"]) . " | " . h($row["Type"]) . ($row["Null"] == "YES" ? " NULL" : "") . "\n"; } echo " |
---|
"; if ($is_view) { echo '' . lang('Alter view') . ''; } else { echo '' . lang('Alter table') . ''; echo ($auto_increment_only ? '' : ' ' . lang('Default values') . ''); } echo ' ' . lang('Select table') . ''; echo ' ' . lang('New item') . ''; if (!$is_view) { echo "
$index[type] | " . implode(", ", $print) . "\n"; } echo " |
---|
' . lang('Alter indexes') . "\n"; if ($table_status["Engine"] == "InnoDB") { echo "
" . implode(", ", array_map('h', $foreign_key["source"])) . ""; echo " | $link"; echo "(" . implode(", ", array_map('h', $foreign_key["target"])) . ")"; echo " | " . (!strlen($foreign_key["db"]) ? '' . lang('Alter') . '' : ' '); } echo " |
---|
' . lang('Add foreign key') . "\n"; } if ($dbh->server_info >= 5) { echo "
$row[Timing] | $row[Event] | " . h($row["Trigger"]) . " | ' . lang('Alter') . "\n"; } echo " |
---|
' . lang('Add trigger') . "\n"; } } }