so, basically i want to get data from the database. the data i want is a people/member without a match team name
in the registration form every member have to fill a team name and then select a category , lets say category A must have a 2 member for each team.
now i want a list of member which dont have a match team name.
how is the logic ?
what im thinking is :
- get a list of team name
- do a looping to check is there a member with the same team name and category ( num rows less than or exactly 1 )
- list the result
i haven't done any code , coz i'm confused with the logic on how i would do it .
hope you guys can help me .
Thanks
anyway i'm currently using codeigniter.
EDIT #1
so here is the table structure
ID | NAME | CATEGORY | TEAM 1 | Person 1 | CAT A | TEAM A 2 | PERSON 2 | CAT A | TEAM A 3 | PERSON 3 | CAT A | TEAM B
what i want in the result is someone without other team member, so the result would be :
3 | PERSON 3 | CAT A | TEAM B
because the other have a matching team