Skip to content

Instantly share code, notes, and snippets.

@alexedwards
Created March 24, 2010 23:47
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 alexedwards/342972 to your computer and use it in GitHub Desktop.
Save alexedwards/342972 to your computer and use it in GitHub Desktop.
function find($id)
{
$query = $this->db->where($this->primary_key, $id)
->get($this->table);
if ($query->num_rows() == 1)
{
return $query->row();
}
return FALSE;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment