Skip to content

Instantly share code, notes, and snippets.

@donaldallen
Created January 14, 2013 22:29
Show Gist options
  • Save donaldallen/4534133 to your computer and use it in GitHub Desktop.
Save donaldallen/4534133 to your computer and use it in GitHub Desktop.
class Businesses_m extends MY_Model {
function get_by_name($name)
{
return $this->db->select('*')
->from('businesses')
->join('locations', 'locations.business_id = businesses.id')
->where('name', $name)
->get()
->result();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment