lukep11a Posted February 3, 2011 Share Posted February 3, 2011 I wonder if anyone can help me, I have a MySQL table of football teams (team_name; link; description; rival_1; rival_2; rival_3;) where each 'team_name' has its own page with the relevant information from the table and is named as the link field from the table. Within each team page I also want to display the rival_1,2 and 3 teams with links to their pages. I know how to just display the information but am struggling with picking up the link from the relevant row in the table. Is this possible or would I be better off just placing a <a href> link around each rival team when I enter it into the MySQL table?? I hope this makes sense, any help would be very much appreciated. Thanks Link to comment https://forums.phpfreaks.com/topic/226604-linking-to-other-rows-within-a-table/ Share on other sites More sharing options...
marcelobm Posted February 3, 2011 Share Posted February 3, 2011 Can you be more clear on what are you having problems with. Also as i asume rival 1,2 and 3 are also teams, i would recommend to make tWo different tables, one teams with columns id, team_name, link. And a second one that will be team_rivals that will have just 2 columns that would both be forefinger keys of the team id making a many to many relation to the team table Link to comment https://forums.phpfreaks.com/topic/226604-linking-to-other-rows-within-a-table/#findComment-1169562 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.