Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Comparison of Tables

Status
Not open for further replies.

Rhyan

Programmer
Jul 4, 2000
33
US
Hi<br><br>I have two tables, Results and Assignments<br><br>Results has the following fields<br>Week (With selections of Week 1, Week 2, Week 3, Week 4)<br>Winner<br>Loser<br>Wins<br>Losses<br><br>Assignments has the following fields<br>Week (With selections of Week 1, Week 2, Week 3, Week 4)<br>Player 1<br>Player 2<br><br>I have a script to display ALL assignments<br>I have a script to display all results<br><br>What I'd like is a script that shows who has not posted match results for assigned matches. (Backgammon League)I'd need a script to display Assignments that do not have a Results posted for them in the Results table.<br><br>Example<br><br>Assignment Table<br>Week&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Player 1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Player 2<br>Week 1&nbsp;&nbsp;&nbsp;Tom&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Jerry<br>Week 2&nbsp;&nbsp;&nbsp;Ed&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Tim<br>Week 3&nbsp;&nbsp;&nbsp;Josh&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Salvador<br>Week 1&nbsp;&nbsp;&nbsp;Sue&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Nancy<br><br>Results Table<br>Week&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Winner&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Loser&nbsp;&nbsp;&nbsp;&nbsp;Wins&nbsp;&nbsp;&nbsp;&nbsp;Losses<br>Week 1&nbsp;&nbsp;&nbsp;Sue&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Nancy&nbsp;&nbsp;&nbsp;&nbsp;2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;1<br>Week 2&nbsp;&nbsp;&nbsp;Ed&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Tim&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;3&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0<br><br>The Script I would like would then show unplayed matches<br><br>Week&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Player 1&nbsp;&nbsp;&nbsp;&nbsp;Player 2<br>Week 3&nbsp;&nbsp;&nbsp;Josh&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Salvadaor<br>Week 1&nbsp;&nbsp;&nbsp;Tom&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Jerry<br><br>Thanks for any help on this<br>
 
Yikes, I guess this is really difficult?
 
Hi&nbsp;&nbsp;Rhyan,&nbsp;&nbsp;I am rubbish at PHP so I could be wrong, but would it be simpler to have another column in the assignment table that held a value depending on whether a match had been played or not (yes/no) and then the SQL call would be really easy (I assume you are using mySQL)<br><br>Anyone else got any ideas? <p>fortytwo<br><a href=mailto:will@hellacool.co.uk>will@hellacool.co.uk</a><br><a href= test site</a><br>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top