NYCPHP Meetup

NYPHP.org

[nycphp-talk] Alternating records to select in MySQL

Aaron Fischer agfische at email.smith.edu
Tue Dec 5 14:28:33 EST 2006


Thanks Allen.  That sounds very much like what I was thinking.

I was getting hung up on some of the logic but I think it's more because 
I have been given a way-too-short deadline to get this done.  =|

Deep breaths...

Cheers, thanks!

-Aaron


Allen Shaw wrote:
> 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
> 
> 
> 



More information about the talk mailing list