alter db collations

This commit is contained in:
Alexander M. Turek
2004-04-17 01:19:06 +00:00
parent 1ecafa5e23
commit ced513ee97
5 changed files with 13 additions and 17 deletions

View File

@@ -27,7 +27,7 @@ $sql_query = 'CREATE DATABASE ' . PMA_backquote($db);
if (!empty($db_collation) && PMA_MYSQL_INT_VERSION >= 40101) {
list($db_charset) = explode('_', $db_collation);
if (in_array($db_charset, $mysql_charsets) && in_array($db_collation, $mysql_collations[$db_charset])) {
$sql_query .= ' DEFAULT CHARACTER SET ' . $db_charset . ' COLLATE ' . $db_collation;
$sql_query .= ' DEFAULT CHARACTER SET ' . $db_charset . ($db_charset == $db_collation ? '' : ' COLLATE ' . $db_collation);
}
unset($db_charset, $db_collation);
}