forked from science-ation/science-ation
Added a command at the end to switch the character encoding for the entire database
This commit is contained in:
parent
78e311322c
commit
e0efe11f03
@ -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";
|
echo "\nFinished updating values with $totalFailCount failed queries.\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user