LordOsh
01-06-2007, 03:51 PM
Hi,
I need your advice. I have a trouble designing my db structure. Imagine I have a links section on my website. These links could be either to files, or to other pages on my website or links outside. Now I need to, somehow, store these links in db. But I dunno how. I thought I could store it as a string containing HTML anchors, but I can't do that because I won't be designing the website, so I dunno how they are going to show the results (eg. what php script will show particular page - another table in db). Which means I can't 'hardcode' the achors. I'm just the guy who is going to create&fill the database.
I know my explanation ain't that good, hope u will understand.
So basically we have:
table 'documents' : id, html text , LINKS (files - this document is file's parent, other documents - I know the id, links outside of the site) ...
table 'files' : name, parent (document id), raw data ...
How to store LINKS in table 'documents'?
Thanks in advance,
Ondrej
I need your advice. I have a trouble designing my db structure. Imagine I have a links section on my website. These links could be either to files, or to other pages on my website or links outside. Now I need to, somehow, store these links in db. But I dunno how. I thought I could store it as a string containing HTML anchors, but I can't do that because I won't be designing the website, so I dunno how they are going to show the results (eg. what php script will show particular page - another table in db). Which means I can't 'hardcode' the achors. I'm just the guy who is going to create&fill the database.
I know my explanation ain't that good, hope u will understand.
So basically we have:
table 'documents' : id, html text , LINKS (files - this document is file's parent, other documents - I know the id, links outside of the site) ...
table 'files' : name, parent (document id), raw data ...
How to store LINKS in table 'documents'?
Thanks in advance,
Ondrej