I'm still working on my project with the challenges, and wanted to try something. Every day new daly challenges are put out. I track them and save them to a database. Sometimes the challenges are reused, in those cases I simply reference the saved challenge in the database, instead of putting in a new row. Other times, however, the challenge title is the same as one previously used, but the requirements or rewards are different. For example:
A Solid Outing - Earn at least 15 kills in a multiplayer Matchmaking game. (reward: 3000)
A Solid Outing - Earn at least 15 kills in a multiplayer Matchmaking game. (reward: 1500)
A Solid Outing - Earn at least 12 kills in a multiplayer Matchmaking game. (reward: 1300)
All three have the same title, the first two have the same requirements but a different reward, the last one has different requirements. I'd like to group these together, so that if today's challenge is the first one (reward 3000), I can show any information about the other two as well. Is there a simple, one-off query for this, or would I be better off simply running a query like this:
SELECT * FROM table WHERE title = "A Solid Outing"
And using PHP to go from there.
A Solid Outing - Earn at least 15 kills in a multiplayer Matchmaking game. (reward: 3000)
A Solid Outing - Earn at least 15 kills in a multiplayer Matchmaking game. (reward: 1500)
A Solid Outing - Earn at least 12 kills in a multiplayer Matchmaking game. (reward: 1300)
All three have the same title, the first two have the same requirements but a different reward, the last one has different requirements. I'd like to group these together, so that if today's challenge is the first one (reward 3000), I can show any information about the other two as well. Is there a simple, one-off query for this, or would I be better off simply running a query like this:
SELECT * FROM table WHERE title = "A Solid Outing"
And using PHP to go from there.
Comment