Difference between revisions of "Change Database Collation"
(→Converting the Database) |
(→Converting the Database) |
||
Line 25: | Line 25: | ||
Once satisfied with the changes. Save and upload the file to the tools folder of your AWBS Website.<br /> | Once satisfied with the changes. Save and upload the file to the tools folder of your AWBS Website.<br /> | ||
At this point it is '''strongly''' suggested to backup your database.<br /> | At this point it is '''strongly''' suggested to backup your database.<br /> | ||
− | To proceed with converting the database, open a | + | To proceed with converting the database, open a web browser and open the url to your file you just uploaded.<br /> |
− | For Example: ''http://www.yoursite.com/tools/convertdb.php'' | + | For Example: ''<nowiki>http://www.yoursite.com/tools/convertdb.php</nowiki>'' |
== Extended System Configuration == | == Extended System Configuration == | ||
== DBCONFIG.PHP Modification == | == DBCONFIG.PHP Modification == |
Revision as of 23:02, February 9, 2009
Some languages require the Database collation to be changed in order to display characters correctly. You will find instructions here on how to change your database collation and configure AWBS to work correctly with this change.
Converting the Database
Copy and paste the example below into a new text file. Give this file a name of convertdb.php (or anything that you will remember, but with the .php extension)
Example:
<?php
$DIR=(dirname(__FILE__));
require($DIR."/../includes/dbconfig.php");
include($workdir."/includes/sessions.php");
include_once($workdir."/config.php");
$tables = mysql_list_tables($dbdatabase);
while (list($table) = mysql_fetch_row($tables)) {
sqlwritesingle("ALTER TABLE $table CONVERT TO CHARACTER SET latin5 COLLATE latin5_turkish_ci;");
echo "$table - DONE
";flush();ob_flush();
}
?>
Edit this line in the script to the correct character set and collation for your language:
sqlwritesingle("ALTER TABLE $table CONVERT TO CHARACTER SET latin5 COLLATE latin5_turkish_ci;");
Once satisfied with the changes. Save and upload the file to the tools folder of your AWBS Website.
At this point it is strongly suggested to backup your database.
To proceed with converting the database, open a web browser and open the url to your file you just uploaded.
For Example: http://www.yoursite.com/tools/convertdb.php