I'm assuming I need to use JOIN, but I'm not totally getting it. Here's my situation. I'm using ion\_auth. It stores users in 'users', groups in 'groups' and stores users' group in 'users\_groups'.

So if I have a group 'sales' with an id of '2', any user associated with that group appears in 'users\_groups' as:

```
id  user_id  group_id
1   1        2
1   2        2

```

So how can I quickly return the results of a query like: get users from group 2. Would the JOIN command be what I'm looking for? I'm using CodeIgniter's Active Record but am open to any suggestions.