Prepare for version 2
git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@604 7c3ca157-0c34-0410-bff1-cbf682f78f5c
This commit is contained in:
parent
812f350805
commit
8598a9757a
|
@ -91,7 +91,7 @@ function edit_type($key, $field, $collations) {
|
||||||
?>
|
?>
|
||||||
<td><select name="<?php echo $key; ?>[type]" onchange="type_change(this);"><?php echo optionlist(array_keys($types), $field["type"]); ?></select></td>
|
<td><select name="<?php echo $key; ?>[type]" onchange="type_change(this);"><?php echo optionlist(array_keys($types), $field["type"]); ?></select></td>
|
||||||
<td><input name="<?php echo $key; ?>[length]" value="<?php echo htmlspecialchars($field["length"]); ?>" size="3" /></td>
|
<td><input name="<?php echo $key; ?>[length]" value="<?php echo htmlspecialchars($field["length"]); ?>" size="3" /></td>
|
||||||
<td><select name="<?php echo $key; ?>[collation]"<?php echo (preg_match('~char|text|enum|set~', $field["type"]) ? "" : " class='hidden'"); ?>><option value="">(<?php echo lang('collation'); ?>)</option><?php echo optionlist($collations, $field["collation"]); ?></select> <select name="<?php echo $key; ?>[unsigned]"<?php echo (!$field["type"] || preg_match('~int|float|double|decimal~', $field["type"]) ? "" : " class='hidden'"); ?>><?php echo optionlist($unsigned, $field["unsigned"]); ?></select></td>
|
<td><?php echo "<select name=\"$key" . '[collation]"' . (preg_match('~char|text|enum|set~', $field["type"]) ? "" : " class='hidden'") . '><option value="">(' . lang('collation') . ')</option>' . optionlist($collations, $field["collation"]) . '</select>' . ($unsigned ? " <select name=\"$key" . '[unsigned]"' . (!$field["type"] || preg_match('~int|float|double|decimal~', $field["type"]) ? "" : " class='hidden'") . '>' . optionlist($unsigned, $field["unsigned"]) . '</select>' : ''); ?></td>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -41,14 +41,6 @@ function get_vals($query) {
|
||||||
return $return;
|
return $return;
|
||||||
}
|
}
|
||||||
|
|
||||||
function table_status($table) {
|
|
||||||
global $dbh;
|
|
||||||
$result = $dbh->query("SHOW TABLE STATUS LIKE '" . $dbh->escape_string(addcslashes($table, "%_")) . "'");
|
|
||||||
$return = $result->fetch_assoc();
|
|
||||||
$result->free();
|
|
||||||
return $return;
|
|
||||||
}
|
|
||||||
|
|
||||||
function unique_idf($row, $indexes) {
|
function unique_idf($row, $indexes) {
|
||||||
foreach ($indexes as $index) {
|
foreach ($indexes as $index) {
|
||||||
if ($index["type"] == "PRIMARY" || $index["type"] == "UNIQUE") {
|
if ($index["type"] == "PRIMARY" || $index["type"] == "UNIQUE") {
|
||||||
|
|
|
@ -284,6 +284,14 @@ function get_databases() {
|
||||||
return $return;
|
return $return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function table_status($table) {
|
||||||
|
global $dbh;
|
||||||
|
$result = $dbh->query("SHOW TABLE STATUS LIKE '" . $dbh->escape_string(addcslashes($table, "%_")) . "'");
|
||||||
|
$return = $result->fetch_assoc();
|
||||||
|
$result->free();
|
||||||
|
return $return;
|
||||||
|
}
|
||||||
|
|
||||||
function fields($table) {
|
function fields($table) {
|
||||||
global $dbh;
|
global $dbh;
|
||||||
$return = array();
|
$return = array();
|
||||||
|
|
Loading…
Reference in a new issue