Hi there Ladies and Gents,
I’m new to MySQL, I have done plenty of work with Microsoft Access so databases in general I am more than comfortable with. I’ve worked a little in MySQL, but only amending the odd table here and there.
I’m trying to achieve a particular relationship between two or maybe three table, yet I’m not sure of the best approach to do this in MySQL. I have a PHP MyAdmin panel which should make life a little easier.
The front end of this database is a ColdFusion based site, which is going to be dynamically driven by the Database.
Basically this is all hypothetical at the moment, but the idea is that I will have two tables, the first of which is the Main section of my site, it will contain all the information for the main pages of my site such as Home, About Us, News, Contact Us etc etc and will be structured as follows.
ID
page_title
page_header
page_content
page_footer
Now, the relationship I need to build is for all the sub sections of the site, so for instants I have a “News” page that is listed in the above table, I will then have another table that will list all of the News Articles. So when someone visits the news page I can then list all of the News Articles for them to read.
The sub-page table will probably have a very similar content to the table above and I just need to link their ID fields so all news article information links to the main news page in the other table.
I’ve probably explained that ass about tit … but I’ve given it a shot … I hope a few of you kind chaps can give me a hand.
Thanks,
Rob
I’m new to MySQL, I have done plenty of work with Microsoft Access so databases in general I am more than comfortable with. I’ve worked a little in MySQL, but only amending the odd table here and there.
I’m trying to achieve a particular relationship between two or maybe three table, yet I’m not sure of the best approach to do this in MySQL. I have a PHP MyAdmin panel which should make life a little easier.
The front end of this database is a ColdFusion based site, which is going to be dynamically driven by the Database.
Basically this is all hypothetical at the moment, but the idea is that I will have two tables, the first of which is the Main section of my site, it will contain all the information for the main pages of my site such as Home, About Us, News, Contact Us etc etc and will be structured as follows.
ID
page_title
page_header
page_content
page_footer
Now, the relationship I need to build is for all the sub sections of the site, so for instants I have a “News” page that is listed in the above table, I will then have another table that will list all of the News Articles. So when someone visits the news page I can then list all of the News Articles for them to read.
The sub-page table will probably have a very similar content to the table above and I just need to link their ID fields so all news article information links to the main news page in the other table.
I’ve probably explained that ass about tit … but I’ve given it a shot … I hope a few of you kind chaps can give me a hand.
Thanks,
Rob