if ($only_test) { Log::notice("Database::query(" . $row_course['db_name'] . ",$query)"); } else { $res = iDatabase::query($query); if ($log) { Log::notice("In " . $row_course['db_name'] . ", executed: $query"); } if ($res === false) { Log::error('Error in ' . $query . ': ' . iDatabase::error()); } } } if (!$singleDbForm) { $tables = iDatabase::get_tables($row_course['db_name']); foreach ($tables as $table) { $query = "ALTER TABLE `" . $table . "` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;"; $res = iDatabase::query($query); if ($res === false) { Log::error('Error in ' . $query . ': ' . iDatabase::error()); } } $query = "ALTER DATABASE `" . $row_course['db_name'] . "` DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;"; $res = iDatabase::query($query); if ($res === false) { Log::error('Error in ' . $query . ': ' . iDatabase::error()); } } $t_student_publication = $row_course['db_name'] . ".student_publication"; $t_item_property = $row_course['db_name'] . ".item_property";