$db = mysql_connect('localhost','Database_sername','Database_password');
if(!$db) echo "Cannot connect to the database - incorrect details";
mysql_select_db('Database_name'); $result=mysql_query('show tables');
while($tables = mysql_fetch_array($result)) {
foreach ($tables as $key => $value) {
mysql_query("ALTER TABLE $value COLLATE utf8_general_ci");
}}
echo "The collation of your database has been successfully changed!";
?>
Please make necessary changes in the script.
No comments:
Post a Comment