Confused

From: Date: Mon, 23 Sep 2002 11:38:04 +0000
Subject: Confused
Groups: php.db 
Request: Send a blank email to php-db+get-21930@lists.php.net to get a copy of this message
I have two MySQL tables, groups and users: groups: group_id, group_name users: user_id, user_name, group_id, etc. I would like to produce one table for each group which will list all the members for that particular group. For example: Blue (group_id 1) Tom (group_id 1) Nancy (group_id 1) Jim (group_id 1) Red (group_id 2) Bob (group_id 1) Susan (group_id 1) James (group_id 1) ... My question is, do I need to run 2 queries? The first to select all the groups and the second to select all the users in each group based on the group_id? How would I loop through to create a table for each group? Thanks inadvance for any help. Randy Rankin

« previous php.db (#21930) next »