[nycphp-talk] Alternating records to select in MySQL
Aaron Fischer
agfische at email.smith.edu
Tue Dec 5 13:47:18 EST 2006
Howdy,
Running into a wall trying to figure out the best way to accomplish the
following:
I have a web form that allows the user to ask a question about a certain
topic.
On the backend I have, say, five people available to answer questions
for each topic. They are stored in a MySQL table.
What I want to do is select one of the five people and send the question
to them. That part is easy. The next part is where I am running into a
stumbling block.
The next time someone submits a question on this topic I want to select
from the remaining four people/records who have not been contacted.
Then the next time select from the three people not contacted, then two,
then one.
After all five have been contacted I want to reset their records so that
I am choosing from all five again.
Thoughts on how to accomplish this?
Thanks,
-Aaron
More information about the talk
mailing list