Hi,
I require some help in making the following possible with mySQL.
My [simplified] database layout is as follows
UserID
Timestamp
League
Field 1
Field 2
Field 3
Field 4
Field 5
Field 6
Fields 1-6 values are either "yes" or "no"
Basically a user submits a form selecting the League they wish to update. They tick the checkboxes to state whether something has been done or not.
e.g.
UserID, Timestamp, League 1, Yes, No, No, No, Yes, No
Another user can then submit a form with what they have done but it may read:
UserID, Timestamp, League 1, No, Yes, Yes, No, No, No
Obviously, from those 2 submissions I can see that Fields 1, 2, 3 and 5 have all had a 'Yes' value stating those items have been completed. Fields 4 and 6 have on both occassions not been done (and reads "no").
User 3 may then come along and update League 2 which has no impact on League 1.
What I am looking for is a mySQL query that outputs the rows as a collective with "Yes" for each League (League 1, League 2, League 3, League 4) so the query would come back with one string:
League 1, Yes, Yes, Yes, No, Yes, No
League 2, No, No, No, No, No, No
Any assistance would be greatly appreciated
Kind Regards
JJ