mirror of
https://github.com/wavelog/wavelog.git
synced 2026-03-22 10:24:14 +00:00
Speed
This commit is contained in:
@@ -255,9 +255,9 @@ class Update extends CI_Controller {
|
||||
}
|
||||
|
||||
// Clear the tables, ready for new data
|
||||
$this->db->empty_table("dxcc_entities");
|
||||
$this->db->empty_table("dxcc_exceptions");
|
||||
$this->db->empty_table("dxcc_prefixes");
|
||||
$this->db->query("TRUNCATE TABLE dxcc_entities");
|
||||
$this->db->query("TRUNCATE TABLE dxcc_exceptions");
|
||||
$this->db->query("TRUNCATE TABLE dxcc_prefixes");
|
||||
$this->update_status();
|
||||
|
||||
// Parse the three sections of the file and update the tables
|
||||
|
||||
@@ -287,8 +287,7 @@ class Update_model extends CI_Model {
|
||||
}
|
||||
|
||||
rewind($f);
|
||||
$this->db->empty_table("lotw_users");
|
||||
$this->db->query("ALTER TABLE lotw_users AUTO_INCREMENT 1");
|
||||
$this->db->query("TRUNCATE TABLE lotw_users");
|
||||
$i = 0;
|
||||
$data = fgetcsv($f, 1000, ",", '"', '\\');
|
||||
do {
|
||||
@@ -564,8 +563,7 @@ class Update_model extends CI_Model {
|
||||
if ($http_result['http_code'] == "200") {
|
||||
$lines = explode("\n", $response);
|
||||
if (count($lines) > 0) { // Check if there was data, otherwise skip parsing / truncating the table and preserve whats there
|
||||
$this->db->empty_table("hams_of_note");
|
||||
$this->db->query("ALTER TABLE hams_of_note AUTO_INCREMENT 1");
|
||||
$this->db->query("TRUNCATE TABLE hams_of_note");
|
||||
$i = 0;
|
||||
foreach($lines as $data) {
|
||||
$line = trim($data);
|
||||
|
||||
Reference in New Issue
Block a user