projects
/
Pman.Core
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
ef95850
)
UpdateDatabase/MysqlLinks.php
author
edward
<edward@roojs.com>
Thu, 10 Dec 2015 06:29:48 +0000
(14:29 +0800)
committer
edward
<edward@roojs.com>
Thu, 10 Dec 2015 06:29:48 +0000
(14:29 +0800)
UpdateDatabase/MysqlLinks.php
patch
|
blob
|
history
diff --git
a/UpdateDatabase/MysqlLinks.php
b/UpdateDatabase/MysqlLinks.php
index
bcfcc71
..
00dbf51
100644
(file)
--- a/
UpdateDatabase/MysqlLinks.php
+++ b/
UpdateDatabase/MysqlLinks.php
@@
-445,10
+445,22
@@
class Pman_Core_UpdateDatabase_MysqlLinks {
echo "CALL mysql_change_charset('{$tbl}') \n";
echo "CALL mysql_change_charset('{$tbl}') \n";
-
$ce = DB_DataObject::factory('core_enum');
$ce = DB_DataObject::factory('core_enum');
- $ce->query("CALL mysql_change_charset('{$tbl}')");
- $ce->free();
+ $ce->query("
+ SELECT
+ CCSA.character_set_name csname,
+ CCSA.collation_name collatename
+ FROM
+ information_schema.`TABLES` T,
+ information_schema.`COLLATION_CHARACTER_SET_APPLICABILITY` CCSA
+ WHERE
+ CCSA.collation_name = T.table_collation
+ AND
+ T.table_schema = mydb COLLATE utf8_unicode_ci
+ AND
+ T.table_name = mytb COLLATE utf8_unicode_ci
+ ");
+
}
}
}
}