Go Back   CodingForums.com > :: Server side development > PHP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 12-06-2010, 06:37 PM   PM User | #1
mrkfc
New Coder

 
Join Date: Aug 2010
Posts: 35
Thanks: 6
Thanked 0 Times in 0 Posts
mrkfc is an unknown quantity at this point
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
mrkfc is offline   Reply With Quote
Old 12-06-2010, 08:26 PM   PM User | #2
Fumigator
UE Antagonizer


 
Fumigator's Avatar
 
Join Date: Dec 2005
Location: Utah, USA, Northwestern hemisphere, Earth, Solar System, Milky Way Galaxy, Alpha Quadrant
Posts: 7,686
Thanks: 42
Thanked 637 Times in 625 Posts
Fumigator is a glorious beacon of lightFumigator is a glorious beacon of lightFumigator is a glorious beacon of lightFumigator is a glorious beacon of lightFumigator is a glorious beacon of light
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.
__________________
Fumigator is offline   Reply With Quote
Old 12-06-2010, 08:37 PM   PM User | #3
mrkfc
New Coder

 
Join Date: Aug 2010
Posts: 35
Thanks: 6
Thanked 0 Times in 0 Posts
mrkfc is an unknown quantity at this point
Thank you
mrkfc is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 06:11 PM.


Advertisement
Log in to turn off these ads.