Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Aug 2010
    Posts
    35
    Thanks
    6
    Thanked 0 Times in 0 Posts

    Automatic League Table

    I currently run a Fifa 11 Gaming League and I have an issue with updating my league table pages automatically when a manager submits a result. I want it to only update the table if both managers report the score and the score is the same on both sides, this seems very confusing and I am struggling to think of a MySQL table structure I could use for this. I am quite proficient in PHP but this seems confusing. Any guidance would be appreciated, I am not sure whether JavaScript could achieve this, if you know please tell me

    Thank you

  • #2
    UE Antagonizer Fumigator's Avatar
    Join Date
    Dec 2005
    Location
    Utah, USA, Northwestern hemisphere, Earth, Solar System, Milky Way Galaxy, Alpha Quadrant
    Posts
    7,691
    Thanks
    42
    Thanked 637 Times in 625 Posts
    This does sound like a design issue you need to resolve. Some possible solutions:

    1) use a column "status_code" to keep tabs on each game submission. It could be as simple as this kind of table:

    0 means neither manager has submitted
    1 means only one manager has submitted
    2 means two managers have submitted and the scores match
    -1 means two managers have submitted and the scores do not match

    2) Store manager submissions in a separate table, relating to the submitted game via foreign key

    This way you can track more accurately which manager submitted, when the score was submitted, and what score was submitted. Much better for keeping an audit trail, but more complex and more coding required. But it solves the problem of staring at a status code of "2" and wondering when the submissions came in and if they really did match.

  • #3
    New Coder
    Join Date
    Aug 2010
    Posts
    35
    Thanks
    6
    Thanked 0 Times in 0 Posts
    Thank you


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •