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

Order collations

git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@764 7c3ca157-0c34-0410-bff1-cbf682f78f5c
This commit is contained in:
jakubvrana
2009-06-29 10:10:59 +00:00
parent c5b520cc46
commit d2fa62d284
2 changed files with 6 additions and 5 deletions

View File

@@ -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"];
}
$return[$row["Charset"]][] = $row["Collation"];
}
$result->free();
ksort($return);
foreach ($return as $key => $val) {
sort($return[$key]);
}
return $return;
}