\n";
while ($row = mysql_fetch_assoc($result)) {
echo "
" . htmlspecialchars($row["Field"]) . " | $row[Type]" . ($row["Null"] == "NO" ? "" : " NULL") . " |
\n";
}
echo "\n";
mysql_free_result($result);
echo '' . lang('Alter table') . "
\n";
echo "" . lang('Indexes') . "
\n";
$indexes = indexes($_GET["table"]);
if ($indexes) {
echo "\n";
foreach ($indexes as $index) {
ksort($index["columns"]);
echo "$index[type] | " . implode(", ", $index["columns"]) . " |
\n";
}
echo "
\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 "" . 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";
}
echo "
\n";
}
$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 "$row[Timing] | $row[Event] | " . htmlspecialchars($row["Statement"]) . " |
\n";
}
echo "
\n";
}
mysql_free_result($result);