1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-08 23:57:29 +02:00

Separate table_status

git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@774 7c3ca157-0c34-0410-bff1-cbf682f78f5c
This commit is contained in:
jakubvrana
2009-07-01 19:58:22 +00:00
parent a02d61c131
commit caeb30f501
6 changed files with 26 additions and 29 deletions

View File

@@ -20,15 +20,6 @@ if ($_POST && !$error && !$_POST["add"] && !$_POST["change"] && !$_POST["change-
}
page_header(lang('Foreign key'), $error, array("table" => $_GET["foreign"]), $_GET["foreign"]);
$tables = array();
$result = $dbh->query("SHOW TABLE STATUS");
while ($row = $result->fetch_assoc()) {
if ($row["Engine"] == "InnoDB") {
$tables[] = $row["Name"];
}
}
$result->free();
if ($_POST) {
$row = $_POST;
ksort($row["source"]);
@@ -52,7 +43,7 @@ $target = ($_GET["foreign"] === $row["table"] ? $source : get_vals("SHOW COLUMNS
<form action="" method="post">
<p>
<?php echo lang('Target table'); ?>:
<select name="table" onchange="this.form['change-js'].value = '1'; this.form.submit();"><?php echo optionlist($tables, $row["table"]); ?></select>
<select name="table" onchange="this.form['change-js'].value = '1'; this.form.submit();"><?php echo optionlist(array_keys(table_status_referencable()), $row["table"]); ?></select>
<input type="hidden" name="change-js" value="" />
</p>
<noscript><p><input type="submit" name="change" value="<?php echo lang('Change'); ?>" /></p></noscript>