From 7ed979b4b6b78729d6c71858857658d3b116dd34 Mon Sep 17 00:00:00 2001 From: Peter Goodhall Date: Tue, 11 Oct 2022 15:03:31 +0100 Subject: [PATCH] Update Api_model.php --- application/models/Api_model.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/application/models/Api_model.php b/application/models/Api_model.php index fd8812ce..2dcf3b27 100644 --- a/application/models/Api_model.php +++ b/application/models/Api_model.php @@ -16,7 +16,8 @@ class API_Model extends CI_Model { function CountKeysWithNoUserID() { $this->db->where('user_id !=', NULL); - return $this->db->count_all('api'); + $query = $this->db->get('CountKeysWithNoUserID'); + return $query->num_rows(); } function ClaimAllAPIKeys($id = NULL) {