" . lang('Unable to show the table definition') . ": " . mysql_error() . ".

\n"; } else { $auto_increment_only = true; echo "\n"; while ($row = mysql_fetch_assoc($result)) { if (!$row["auto_increment"]) { $auto_increment_only = false; } echo "\n"; } echo "
" . htmlspecialchars($row["Field"]) . "$row[Type]" . ($row["Null"] == "YES" ? " NULL" : "") . "
\n"; mysql_free_result($result); echo "

"; echo '' . lang('Alter table') . ''; echo ($auto_increment_only ? '' : ' ' . lang('Default values') . ''); echo "

\n"; echo "

" . lang('Indexes') . "

\n"; $indexes = indexes($_GET["table"]); if ($indexes) { echo "\n"; foreach ($indexes as $index) { ksort($index["columns"]); echo "\n"; } echo "
$index[type]" . implode(", ", $index["columns"]) . "
\n"; } echo '

' . lang('Alter indexes') . "

\n"; $foreign_keys = foreign_keys($_GET["table"]); if ($foreign_keys) { echo "

" . lang('Foreign keys') . "

\n"; echo "\n"; foreach ($foreign_keys as $foreign_key) { echo "\n"; } echo "
" . implode(", ", $foreign_key[2]) . "" . (strlen($foreign_key[0]) && $foreign_key[0] !== $_GET["db"] ? "" . htmlspecialchars($foreign_key[0]) . "." : "") . htmlspecialchars($foreign_key[1]) . "(" . implode(", ", $foreign_key[3]) . ")
\n"; } } if (mysql_get_server_info() >= 5) { $result = mysql_query("SHOW TRIGGERS LIKE '" . mysql_real_escape_string($_GET["table"]) . "'"); if (mysql_num_rows($result)) { echo "

" . lang('Triggers') . "

\n"; echo "\n"; while ($row = mysql_fetch_assoc($result)) { echo "\n"; } echo "
$row[Timing]$row[Event]
" . htmlspecialchars($row["Statement"]) . "
\n"; } mysql_free_result($result); }