jpadie thanks for your replies.
I'm hoping you figured out that your sql wouldn't work. I needed teams PER division or divisions PER team.
I got the solution from Rick James on the MySql forum. He just looked at my query and saw what was wrong.
You can't do 2 exclusive INNER JOINs on the same...
Chris: "Redesign the database structure and schema." Excellent idea! HOW?
If I knew that I never would have started this thread.
Chris: "Oh I really DO hope that is not a serious suggestion!" Did you read the whole reply?
I said I can do it that way, as if to say I don't think you're grasping...
There is no implicit relationship between the 2 tables.
A piece of work is done and specific 'entities' (for lack of a better term) are involved.
The only relationship between the 'entities' is that they were both involved with the work.
This is based on what the client selects for the given...
Sorry, this is frustrating and I can't edit replies here.
The teams table & the divisions table are filled with values entered by the client.
"A person enters a score (based on a question) and attributes the score to a combination of divisions and/or teams."
I'm starting to think you're just playing with me.
A database programmer should be able to pretty clearly see what my problem is.
I even left you a dump file.
OK, I'll try.
The teams table amounts to a table of values. The divisions table amounts to a table of values.
There is no implicit connection between teams and divisions.
A person enters a score (based on a question) and attributes the score to a combination of divisions and/or teams.
Multiple...
I've got a non-disclosure so I really can't divulge the app. The problem is straight forward though.
Yes, the same team can be in any division and visa versa so an fk in either of those tables is no help.
I neglected to point out that more than 1 division and/or more than 1 team can be...
I've got 4 tables:
divisions (ID, Division)
teams (ID, Team)
scores(ID, RelationID, Score)
relations (ID, RelationID, FieldID, ValID)
The relations table is to 'link' divisions and teams by RelationID
The FieldID defines the table (1=divisions; 2=teams)
The ValID = the ID of the given table...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.