Alternating Values

From: Date: Mon, 09 Jul 2001 23:35:24 +0000
Subject: Alternating Values
Groups: php.db 
Request: Send a blank email to php-db+get-10192@lists.php.net to get a copy of this message
I'm trying to figure out the best way to do this. People will be signing up online and their info will be put into a database. They will be assigned a room and each successive person will be assigned a different room. There are different categories for each group of people also. So there will be: Group1 -Rm101 -Rm102 -Rm103 Group2 -Rm300 -Rm301 etc. They need to have an equal amount of people in each room so the first person in Group1 would Rm101, next person Rm102 etc. Would it be best to retrieve the last person from the Group, find out what room number they have, then if last in Group1 is Rm101, this person be assigned Rm102 with that equation being in the PHP script? If that's the case would I retrieve all the records for Group1 and find the largest ID (auto_increment type)? Thanks. Jeff Oien

« previous php.db (#10192) next »