MySQL Forums
Forum List  »  Newbie

Date/Name/Attendance Matrix through SQL
Posted by: Clemen Cichocki
Date: May 26, 2019 03:51PM

Hi! I'm new here and have been putting together a Database to track Player (rougly 40 players) attendance over time.

I have three tables: Datasets, Dates, Players.

Table Datasets:

Date|Player (lists entries for every player on every day they show up along with a few other values.

Table Dates:

Dates| (listes every day of the year)

Table Roster:
Names| (lists all the players)

I would like to get a table that uses the column Dates.Dates as the column headers for the new table, and Names.Roster as rows.

Then I want mark every intersecting cell where a player was present on a certain date. (I've been outputting my queries through either php and/or wpdatatables in wordpress. So the "mark" could be a string or boolean, or i might make it a css class. I think that won't be a problem, once I figure out the logic behind the table joins/presentation.

I hope I asked the question the right way and break any rules. I hope somebody can help me.

(I tried google a lot, but I can't formulate the question well enough)

Thank you!

Clemens

Options: ReplyQuote


Subject
Written By
Posted
Date/Name/Attendance Matrix through SQL
May 26, 2019 03:51PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.