Before importing activity csv from lotw empty the table

This commit is contained in:
Peter Goodhall
2019-06-16 16:52:32 +01:00
parent 5db81d6089
commit 890a5abda6
2 changed files with 4 additions and 2 deletions

View File

@@ -301,6 +301,8 @@ class Lotw extends CI_Controller {
set_time_limit(0);
$this->load->model('lotw_user');
$this->lotw_user->empty_table();
$row = 1;
if (($handle = fopen("https://lotw.arrl.org/lotw-user-activity.csv", "r")) !== FALSE) {
while (($data = fgetcsv($handle, 1000, ",")) !== FALSE) {

View File

@@ -9,8 +9,8 @@ class Lotw_user extends CI_Model {
}
function empty_table($table) {
$this->db->empty_table($table);
function empty_table() {
$this->db->empty_table('lotw_userlist');
}
function add_lotwuser($callsign, $date) {