Order collations
git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@764 7c3ca157-0c34-0410-bff1-cbf682f78f5c
This commit is contained in:
parent
c5b520cc46
commit
d2fa62d284
|
@ -311,13 +311,13 @@ function collations() {
|
|||
$return = array();
|
||||
$result = $dbh->query("SHOW COLLATION");
|
||||
while ($row = $result->fetch_assoc()) {
|
||||
if ($row["Default"] && $return[$row["Charset"]]) {
|
||||
array_unshift($return[$row["Charset"]], $row["Collation"]);
|
||||
} else {
|
||||
$return[$row["Charset"]][] = $row["Collation"];
|
||||
}
|
||||
}
|
||||
$result->free();
|
||||
ksort($return);
|
||||
foreach ($return as $key => $val) {
|
||||
sort($return[$key]);
|
||||
}
|
||||
return $return;
|
||||
}
|
||||
|
||||
|
|
|
@ -25,6 +25,7 @@ if ($_POST && !$error && !$_POST["add"] && !$_POST["drop_col"] && !$_POST["up"]
|
|||
page_header((strlen($_GET["procedure"]) ? (isset($_GET["function"]) ? lang('Alter function') : lang('Alter procedure')) . ": " . htmlspecialchars($_GET["procedure"]) : (isset($_GET["function"]) ? lang('Create function') : lang('Create procedure'))), $error);
|
||||
|
||||
$collations = get_vals("SHOW CHARACTER SET");
|
||||
sort($collations);
|
||||
$row = array("fields" => array());
|
||||
if ($_POST) {
|
||||
$row = $_POST;
|
||||
|
|
Loading…
Reference in a new issue