projects
/
Pman.Core
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
cd38d10
)
UpdateDatabase/MysqlLinks.php
author
edward
<edward@roojs.com>
Thu, 10 Dec 2015 06:32:09 +0000
(14:32 +0800)
committer
edward
<edward@roojs.com>
Thu, 10 Dec 2015 06:32:09 +0000
(14:32 +0800)
UpdateDatabase/MysqlLinks.php
patch
|
blob
|
history
diff --git
a/UpdateDatabase/MysqlLinks.php
b/UpdateDatabase/MysqlLinks.php
index
0244170
..
7520c9f
100644
(file)
--- a/
UpdateDatabase/MysqlLinks.php
+++ b/
UpdateDatabase/MysqlLinks.php
@@
-437,7
+437,6
@@
class Pman_Core_UpdateDatabase_MysqlLinks {
function updateCharacterSet()
{
function updateCharacterSet()
{
- print_R($this->database());exit;
foreach (array_keys($this->schema) as $tbl){
if(strpos($tbl, '__keys') !== false ){
foreach (array_keys($this->schema) as $tbl){
if(strpos($tbl, '__keys') !== false ){
@@
-446,22
+445,11
@@
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->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
- ");
+ $ce = DB_DataObject::factory('core_enum');
+ $ce->query("CALL mysql_change_charset('{$tbl}')");
+ $ce->getDatabaseConnection()->disconnect();
+// $ce->free();
}
}
}
}