Skip to content

Instantly share code, notes, and snippets.

@hipsterjazzbo
Created July 28, 2011 01:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hipsterjazzbo/1110750 to your computer and use it in GitHub Desktop.
Save hipsterjazzbo/1110750 to your computer and use it in GitHub Desktop.
Check is client is cached in the DB
public function is_cached($client_id)
{
$query = $this->db->select('id')->where('client_id', $client_id)->get('clients');
if($query->num_rows() == 0) {
return false;
}
return true;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment