Jump to content

PHP List


arleslie

Recommended Posts

I'm trying to make it display like this:

 

Group Name
member, member, member

Another Group
another member, another member, another member

 

Heres the table layout

 

Groups
   	id 	name 	captain 	luteinet 	major 	private

Members
   	id 	gamertag 	rank 	weapon 	bungie

 

I only want it to display the group name one and all of the members that link with that group.

I'm linking the two by "groups.name" and "members.rank"

Link to comment
https://forums.phpfreaks.com/topic/135275-php-list/
Share on other sites

fenway meant that how you display data doesn't have anything to do with how you query the database.

 

How does the Members table relate to the Group table?  Does each member have a Group ID = to one of the Groups.id ?  All we can see is that you have 2 tables, but no indicator that they are related..

 

if the Members table had a column like say: "gid" meaning group id, and each member had the value of an id in the Groups table, that would show their relation.

Link to comment
https://forums.phpfreaks.com/topic/135275-php-list/#findComment-706464
Share on other sites

I only want it to display the group name one and all of the members that link with that group.

I'm linking the two by "groups.name" and "members.rank"

As I stated above the to tables are linked by groups.name and members.rank.

members.rank has the same value as groups.name as of which group it's in.

Link to comment
https://forums.phpfreaks.com/topic/135275-php-list/#findComment-706468
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.