I am building a simple lottery web game that will let users pick a number that is in between that weeks given range. A number will be randomly select to determine the winner. I have a table for users (id, username, password, pin, funds) but as I go to setup the games table I get kinda stumped. How do I keep track of what numbers have been picked so far and who they belong to? game (id, date, winner…)? How do I handle the fact that the number range can change from week to week?
Is this heading in the right direction?
I’d create another table to store the number range each week (store the date and range) and then another table to store the user’s selection (store the user id, date, and chosen number).