public function get_priority($priority) { $this->db->where('priority', $priority); $query = $this->db->get($table_name); // do checking here! return $this->query->result(); }