Created
March 10, 2009 22:11
-
-
Save shadowhand/77176 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
public function find_all_by_role($role) | |
{ | |
return $this | |
->join('roles_users', 'users.id', 'roles_users.user_id') | |
->join('roles', 'roles_users.role_id', 'roles.id') | |
->where('roles.name', $role) | |
->find_all(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment