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) {