From e0efe11f03fcab91a7fe1fbaf5bd906bd1a65227 Mon Sep 17 00:00:00 2001 From: jacob Date: Thu, 10 Jun 2010 19:09:00 +0000 Subject: [PATCH] Added a command at the end to switch the character encoding for the entire database --- db/db.update.173.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/db/db.update.173.php b/db/db.update.173.php index bf28b4f..d097c12 100644 --- a/db/db.update.173.php +++ b/db/db.update.173.php @@ -195,6 +195,19 @@ function db_update_173_post(){ } } + + // finally, we'll update the character encoding on the database itself + global $DBNAME; + $query = "ALTER DATABASE `$DBNAME` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci"; + echo "$query\n"; + $success = mysql_query($query); + if($success){ + echo "Successfully switched database character set to utf8\n"; + }else{ + echo "Unable to switch database character set to utf8\n"; + $totalFailCount++; + } + echo "\nFinished updating values with $totalFailCount failed queries.\n"; }