You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

21 lines
330 B

<?php
class Api_model extends CI_Model{
public function check_key($key)
{
$this->db->count_all();
$this->db->from('api_key');
$this->db->where('key', $key);
$query = $this->db->get('');
if ($query->num_rows() == 1)
{
return true;
} else {
return false;
}
}
}