Jump to content

Recommended Posts

i have this table

 select MatchID,HomeScore,AwayScore from tbl_matches ;
+---------+-----------+-----------+
| MatchID | HomeScore | AwayScore |
+---------+-----------+-----------+
|      11 |         1 |         1 |
|      12 |         3 |         3 |
|      13 |         3 |         0 |
|      14 |         3 |         0 |
|      15 |         1 |         0 |
|      16 |         1 |         0 |
|      17 |         0 |         0 |
|      18 |         0 |         0 |
|      19 |         0 |         1 |
|      20 |         0 |         0 |
|      21 |         0 |         0 |
|      22 |         1 |         1 |
|      23 |         0 |         0 |
|      24 |         0 |         0 |
|      25 |         0 |         0 |
|      26 |         0 |         0 |
|      27 |         0 |         0 |
|      28 |         0 |         0 |
|      29 |         1 |         0 |
|      30 |         0 |         0 |
|      31 |         0 |         0 |
+---------+-----------+-----------+
21 rows in set (0.00 sec)

how can i set the unentered result .for now it is like all the games wether played or not are at 0:0.i need to be able to get  accurate table log of all the games such that if result is not set this can be identified and not set to 0:0. should i set the default to Null,or not null for the  HomeScore and awayscore?

Edited by shaddf
Link to comment
https://forums.phpfreaks.com/topic/303517-setting-results/
Share on other sites

NULL represents a lack of information. This would be a good time to use it.

 

In my opinion, you should have another means of knowing whether the match has been played - deciding that a match has been played should not depend on there being a score recorded. Perhaps a status ENUM (eg, "scheduled" vs. "played") or a played flag (false/0 vs. true/1).

Link to comment
https://forums.phpfreaks.com/topic/303517-setting-results/#findComment-1544481
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.