SilentDeath Posted October 22, 2010 Share Posted October 22, 2010 Hello, I plan on running a contest of sorts and I would like to know how to best count the amount of points accumulated in a day. At the moment i just have a setup with id | name | points. Would I have to create a new column for each day or something like that? Any help would be much appreciated. Thanks. Link to comment https://forums.phpfreaks.com/topic/216533-table-structure-and-date-question/ Share on other sites More sharing options...
Hybride Posted October 22, 2010 Share Posted October 22, 2010 I would have two tables at that point, something like: The points table: P_ID | P_DATE | P_POINTS The user table: U_ID | U_USERNAME where U_ID -> P_ID and every day a new row is inserted (would probably be a cron job) in the points table with the points accumulated for the day. Link to comment https://forums.phpfreaks.com/topic/216533-table-structure-and-date-question/#findComment-1125391 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.