Adjust SQL to exlude done requests

pull/1883/head
phl0 2022-12-29 23:32:40 +01:00
rodzic c7e1f6a39f
commit 49af108202
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 48EA1E640798CA9A
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -296,7 +296,7 @@ class Oqrs_model extends CI_Model {
public function oqrs_requests($location_list) {
if ($location_list != "") {
$sql = 'SELECT COUNT(*) AS number FROM oqrs JOIN station_profile ON oqrs.station_id = station_profile.station_id WHERE oqrs.station_id IN ('.$location_list.')';
$sql = 'SELECT COUNT(*) AS number FROM oqrs JOIN station_profile ON oqrs.station_id = station_profile.station_id WHERE oqrs.station_id IN ('.$location_list.') AND status < 2';
$query = $this->db->query($sql);
$row = $query->row();
return $row->number;