Skip to content

Commit

Permalink
minor cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
twoln committed May 14, 2024
1 parent 32db4ee commit b8ef46f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions utils/update_monitor_copy.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,8 @@ public function update_table($table_name) {
$this->db_local->query("CREATE TEMPORARY TABLE $tmp_table SELECT * FROM $table LIMIT 0");
$sourceDB = $this->tablesource[$table_name];
$this->db->select_db($sourceDB);
$result = $this->db->query("SET NAMES 'utf8'");
$result = $this->db_local->query("SET NAMES 'utf8mb4'");
$this->db->query("SET NAMES 'utf8'");
$this->db_local->query("SET NAMES 'utf8mb4'");
$result = $this->db->query("SELECT * FROM $table");
$queryFields = implode(',', array_column($this->fields[$table_name],0));
while ($row = $result->fetch_assoc()) {
Expand Down Expand Up @@ -155,7 +155,7 @@ public function fill_table($table_name) {
} elseif($this->tablesource[$table_name] == 'eduroamv2') {
$this->db_local->select_db('eduroamv2');
}
$result = $this->db_local->query("SET NAMES 'utf8mb4'");
$this->db_local->query("SET NAMES 'utf8mb4'");
$this->db_local->query("DELETE FROM $table");
$this->db_local->query("INSERT INTO $table SELECT * from $tmp_table");
}
Expand Down

0 comments on commit b8ef46f

Please sign in to comment.