I fist need it to function first.
As far as I can tell now is there are 3 different entry points for a match to be created:
- Admin Panel
- Ladder / Tournament
- Challenge us
The main difference between the 3 lies that the admin panel needs to select both teams, the ladder/tournament does that by a pool, and the challenge us has a team pre selected (since the US).
So with that in mind, I need to start prepping the system to fetch these 3 indepent methods.
For this purpose I have setup a system table "cs_matchtype" that contains this info. So I can backtrack who created what.
On a sidetrack here, I need the system ranks to have a field where it says "can create matches". Since we only want certain people (eg: captains) to press "the challenge us" button. So I need to add this now.

Ok by now it gets a bit tedious more less. Because to select all the teams from the 'captain' perspective I need teams, player, teamplayers and the rank system. Ah well... I like long queries too :)
select tid,tname from cs_team inner join cs_teamplayers on tid = tptid inner join cs_rank on tprank = rankid where rankmatches=1 and tppid=$pid order by tname
But something like this should do it.
Geen opmerkingen:
Een reactie posten