[nycphp-talk] Alternating records to select in MySQL
Allen Shaw
ashaw at polymerdb.org
Tue Dec 5 13:54:03 EST 2006
Aaron Fischer wrote:
> Howdy,
> ...
> 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.
> ...
> After all five have been contacted I want to reset their records so that
> I am choosing from all five again.
> ...
>
Hi Aaron,
You need a column called something like `selected` in that table. Set
it to 1 if the person's been selected. Once they're all selected, start
over by setting them all to 0. You'll have to write the logic in PHP
for those steps, but that's the gist of it.
Does that work for you?
- Allen
--
Allen Shaw
Polymer (http://polymerdb.org)
slidePresenter (http://slides.sourceforge.net)
More information about the talk
mailing list