I am writing an application which shows a user one thing to vote on, at a time. I have a MySQL table which contains these things. Right now I have it set up so that upon login, I query my database to get a limited number of these things, and then I use PHP to turn that into an array. After a user submits a vote, the thing they ve already voted on is unset from the array. When the new array size is one, I query my database to create a new array. Is this a bad way to do it? Should I instead just query my database to get a new thing for the user to vote on after every time they submit a vote?
感谢任何帮助/建议。