Make sure that VUCC_Grid hasn't been filled in before adding a gridsquare to the COL_gridsquare

pull/977/head
Peter Goodhall 2021-03-31 15:41:11 +01:00
rodzic f1b5f00bcd
commit c20c9bb59f
1 zmienionych plików z 3 dodań i 0 usunięć

Wyświetl plik

@ -2178,6 +2178,9 @@ class Logbook_model extends CI_Model {
// check which to update - records with no Gridsquare or all records
$this->db->where("COL_GRIDSQUARE is NULL or COL_GRIDSQUARE = ''");
$where = "(COL_GRIDSQUARE is NULL or COL_GRIDSQUARE = '') AND (COL_VUCC_GRIDS is NULL or COL_VUCC_GRIDS = '')";
$this->db->where($where);
$r = $this->db->get($this->config->item('table_name'));
$count = 0;