Hi, I'm creating a game where users play daily & earn points. I wanted to record the scores of each user each day for a month. At first, I thought to create 31 columns within the table & store the score in the appropriate date field. But, I think it is a bit messy. Is there any other alternative where I could I achieve the same thing. Any help is appreciated.
v1shwa 0 Light Poster
Recommended Answers
Jump to PostDatabase Table:
user_id | score | scoredate
What else do you need?
You can draw out any data you want from specific queries using the WHERE clause, ORDER BY and LIMIT clauses.
e.g.
…... WHERE scoredate BETWEEN ... AND ... ORDER BY score DESC LIMIT 5
All 4 Replies
Casperjames 0 Light Poster

diafol
mattster 195 Practically a Master Poster Featured Poster
v1shwa 0 Light Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.