From b0a9b32e564a1e93e280f0497433d1e9e4a7fe3b Mon Sep 17 00:00:00 2001 From: pavlosb Date: Mon, 27 May 2024 14:16:31 +0300 Subject: [PATCH] Update Itindata_model.php --- application/models/Itindata_model.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/application/models/Itindata_model.php b/application/models/Itindata_model.php index 2ead761..ceaa09c 100644 --- a/application/models/Itindata_model.php +++ b/application/models/Itindata_model.php @@ -220,7 +220,9 @@ public function get_inspectionsfull($where=null) foreach ($where as $field => $value): $q .= $field." = ".$value; endforeach; - } + } else { + $q .= " ORDER BY k.date_inspection DESC"; + } $query = $this->db->query($q); if ($query -> num_rows() > 0) { foreach ($query->result() as $row) {