fixed bug where M1 was not assigned as england

This commit is contained in:
Peter Goodhall
2014-03-03 17:37:53 +00:00
parent 008471a19d
commit 6fe357ef3b

View File

@@ -28,7 +28,7 @@ class DXCC extends CI_Model {
$query = $this->db->query('
SELECT *
FROM dxcc
WHERE prefix = SUBSTRING( \''.$callsign.'\', 1, LENGTH( prefix ) )
WHERE prefix = SUBSTRING( \''.$callsign.'\', 1, LENGTH( prefix ) ) AND end_date = "0000-00-00 00:00:00"
ORDER BY LENGTH( prefix ) DESC
LIMIT 1
');