From 64f7adb3b0e68ed7e0aaf6f57e2d4fb85fd2a365 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Mon, 2 Feb 2009 16:16:37 +0300 Subject: move mysql_convert_unicode to utils/ --- mysql_convert_unicode.php | 106 ---------------------------------------------- 1 file changed, 106 deletions(-) delete mode 100644 mysql_convert_unicode.php (limited to 'mysql_convert_unicode.php') diff --git a/mysql_convert_unicode.php b/mysql_convert_unicode.php deleted file mode 100644 index 6d43c234c..000000000 --- a/mysql_convert_unicode.php +++ /dev/null @@ -1,106 +0,0 @@ - - - - -MySQL Charset Converter - - - - - - - - - - - -

- - - - "; - - } else if (!$op) { - - print_warning(__("Please backup your database before proceeding.")); - - print "

" . __("This script will convert your Tiny Tiny RSS database to UTF-8. - Depending on current database charset you may experience data corruption (lost accent characters, etc.). - After update, you'll have to set MYSQL_CHARSET option in config.php to 'utf8'.") . "

"; - - print "
- - -
"; - - } else if ($op == "do") { - - print "

".__("Converting database...")."

"; - - db_query($link, "BEGIN"); - db_query($link, "SET FOREIGN_KEY_CHECKS=0"); - - $result = db_query($link, "SHOW TABLES LIKE 'ttrss%'"); - - while ($line = db_fetch_assoc($result)) { - $vals = array_values($line); - $table = $vals[0]; - - $query = "ALTER TABLE $table CONVERT TO - CHARACTER SET 'utf8'"; - - print "

$query

"; - - db_query($link, $query); - } - - db_query($link, "SET FOREIGN_KEY_CHECKS=1"); - db_query($link, "COMMIT"); - - print "
- -
"; - - } - -?> - - - - -- cgit v1.2.3