git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@764
7c3ca157-0c34-0410-bff1-
cbf682f78f5c
$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"];
- }
+ $return[$row["Charset"]][] = $row["Collation"];
}
$result->free();
+ ksort($return);
+ foreach ($return as $key => $val) {
+ sort($return[$key]);
+ }
return $return;
}
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;