Hi.. I'm working on a site where I want to post the scores of specific people's games. I need to select only specific fields in certain pages and am not sure how to go about it. I've searched through the PHP manual and SQL querys with no luck.
Basically, this is what I have.
TABLE:
| ID# | plyr_name | score1 | score2 | score3 | notes |
| 001 | Billy Bobb | 000034 | 000023 | 000229 | blah |
| 002 | Tom Bobb | 000523 | 000234 | 000075 | blah |
| 003 | Mike Bobb | 000112 | 000053 | 000378 | blah |
| 004 | Billy Bobb | 000009 | 000011 | 000232 | blah |
Note that the ID# is the Primary Key and also auto increments.
What I have is a page where a player (take Billy Bobb) can see each of his individual tourneys (and only his, nobody else's), ordered by the tourney ID#. On THAT page, the problem I am having is that the "Notes" field is a link, and I need to somehow reference the link (which opens up a new page) to the Tourney ID#.
For example, if Billy wants to see his notes for Tourney #1 (in this case, Tourney ID# 001), he clicks on the "NOTES" link and his notes from ID 001 come up in that window.
What's happening to me now is that I get the notes, but it's always the last Tourney listed in the tourney list (so, with the above example, Billy clicks on "NOTES" for Tourney 001 and gets the notes for Tourney 004).
Secondly, I need to combine the scores on a second page... so that the players can see their totals for Score1, and Score2, etc., in a "Scoreboard" - like format. So, for example on this page Billy would see "Score1 = 43, Score2 = 34, and Score3 = 461". I'm having trouble figuring out how to add and combine the scores to get a total for each Score field together, and then display it.
Part of the second problem may be my table... I have the "Score" fields set as INT.
Can anyone shed some advice? Thanks in advance...