Thanks to anyone who has the time to spare and help me. I'm a little bit new to multiple table queries, so I'm not exactly sure where to start.

What I've got in terms of structure is this:

table 1: plr_points

id [member id] | points | reason | Date

table 2: plr_squads

id [squad id] | squad name [prefab]

table 3: plr_squadmembers

id [member id] | member name | Squad id


Essentially what I want to do is a top scoring by squad list, so I need a point value per squad member which is then used to determine total number of points in that squad, and finally a listing of the squads in order of highest point value.

Here's some dummy content to help visualize the structure a bit more:

1 | 5 | Recruiting | 1/1/2011
1 | 1 | Platinum | 1/1/2011
1 | 1 | Platinum | 1/1/2011
2 | 1 | Filled server | 1/4/2011
1 | 1 | Won weekly gamenight | 1/9/2011
3 | 1 | Won weekly gamenight | 1/9/2011
4 | 1 | Won weekly gamenight | 1/9/2011

1 | Devildogs
2 | Warlords

1 | Johndoe | 1
2 | Janedoe | 1
3 | Schmoe | 1
4 | Schmitt | 2
5 | Smchetzl | 2
6 | Schnyder | 2

Again, I'm fairly new to working with multiple tables so I'm at a loss for where to begin, but any help would be greatly appreciated. I do not intend to take advantage of the members here, simply guidance in the right direction would be fantastic. (I know this was in the mySQL section, but I am intending to do this with PHP)