Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.