*/ // To launch, remove the following line die(); require __DIR__.'/../../main/inc/global.inc.php'; $sql = "SELECT table_name, table_collation FROM information_schema.tables where TABLE_SCHEMA='".$_configuration['main_database']."'"; $res = Database::query($sql); while ($row = Database::fetch_assoc($res)) { if ($row['table_collation'] == 'utf8_unicode_ci') { continue; //do nothing } $sqlu = 'ALTER TABLE '.$row['table_name'].' CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci'; $resu = Database::query($sqlu); echo $row['table_name']." converted\n"; }