Question
joining question
Wondering if someone could guide me in the direction I need
to pull some results. I have a dynamic select box that I only want
to pull teams from if they are not involved in a challenge.
Question is, I'm not quite sure how to go about pulling this out.
I have a table name "team". Fields: id, captain, teamname
And a table holding the challenges called "teamchallenges" Fields: id, team1, team2, team3, team1active, team2active, team3active
What I want to do is display in this dropdown the id, captain and teamname from "team" ONLY if they are not listed anywhere in the "teamchallenges" table as being active.
The variable "team1" holds the id from the table "team" and then the variable "team1active" is a yes or no. Same goes for the variables 1 - 3.
I am stumped on what kind of coding I need to do this. I think I need some type of inner join.
I have a table name "team". Fields: id, captain, teamname
And a table holding the challenges called "teamchallenges" Fields: id, team1, team2, team3, team1active, team2active, team3active
What I want to do is display in this dropdown the id, captain and teamname from "team" ONLY if they are not listed anywhere in the "teamchallenges" table as being active.
The variable "team1" holds the id from the table "team" and then the variable "team1active" is a yes or no. Same goes for the variables 1 - 3.
I am stumped on what kind of coding I need to do this. I think I need some type of inner join.
