Added a command at the end to switch the character encoding for the entire database

This commit is contained in:
jacob 2010-06-10 19:09:00 +00:00
parent 78e311322c
commit e0efe11f03

View File

@ -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";
}