View Single Post
  #1  
Old 08-22-2006, 02:28 PM
paranoid paranoid is offline
OSP Starters
 
Join Date: Aug 2006
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
paranoid is on a distinguished road
Default Table Design for Related Links

Hello members

I am running into an issue on a table design.

Given:

Two tables: Section Headings & Section Links

Section Headings has sh_id & sh_title as columns (fields)

Section Links has sl_id, sl_text, sl_title, sl_url and sh_id (as a foreign key)


Currently:

I toss SQL the sh_id and have it return/format all of the section links under that particular heading.


Where I am Stuck:

I would like to have a series of related links underneath the section links. However, I am not sure how to utilize the data I already have entered into the database to make this happen. Ideally, I would like to be able to toss a script a single ID and have it return all the links similar to how I have the section links set up.

My original thought was to put in another foreign key (relatedLinks_id), but that doesn't work since some of the -- This message may have been cut off and the rest will only be shown to members. To become a member, click here --
Reply With Quote
  Webmaster Forums - View Single Post - Table Design for Related Links
View Single Post
  #1  
Old 08-22-2006, 02:28 PM
paranoid paranoid is offline
OSP Starters
 
Join Date: Aug 2006
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
paranoid is on a distinguished road
Default Table Design for Related Links

Hello members

I am running into an issue on a table design.

Given:

Two tables: Section Headings & Section Links

Section Headings has sh_id & sh_title as columns (fields)

Section Links has sl_id, sl_text, sl_title, sl_url and sh_id (as a foreign key)


Currently:

I toss SQL the sh_id and have it return/format all of the section links under that particular heading.


Where I am Stuck:

I would like to have a series of related links underneath the section links. However, I am not sure how to utilize the data I already have entered into the database to make this happen. Ideally, I would like to be able to toss a script a single ID and have it return all the links similar to how I have the section links set up.

My original thought was to put in another foreign key (relatedLinks_id), but that doesn't work since some of the -- This message may have been cut off and the rest will only be shown to members. To become a member, click here --
Reply With Quote