diff --git a/application/models/Logbook_model.php b/application/models/Logbook_model.php index c1a8e4cf..f95f39d9 100755 --- a/application/models/Logbook_model.php +++ b/application/models/Logbook_model.php @@ -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;