PDA

View Full Version : Master/Detail pages in Dreamweaver


cjbigboy
01-05-2007, 02:06 PM
Hi

I am building a site for a friend and would be grateful of any advice regarding my problem. I am working with DW8, ASP & Access DB.

I have successfully created a Master/detail page that draws its data from one table in a database and displays a list of results then the details page shows specific details etc, no problems there.

I need to create another area of the site that has a list of categories from one table in a database displayed on the page either as image links or text. When clicked each one needs to then show all records relevent to that category or maybe even sub-categories, followed by details from another table.

I'm pretty much new to this Database driven lark, and the original master detail page was pretty much at the extent of my knowledge.

A few pointers in the right direction would be brilliant.

thanking you in advance

regards

CJ :)

davidj
01-05-2007, 02:25 PM
pointer 1

give PHP ago

try our tutorials

the trouble is we dont have an ASP guru that would be able to help you when you get into deeper water.

try PHP. I promise you wont regret it

cjbigboy
01-05-2007, 02:30 PM
Thanks

Believe me, I've tried PHP and can't get to grips with it or MySQL.

Thanks anyway

CJ :)

lux
01-05-2007, 02:38 PM
i could put together some php pages that can do this for you, with an explanation, if you like or is the website development to far ahead that changing languages would be of no use?

davidj
01-05-2007, 02:39 PM
please give our tutorial one try

take an hour out and follow the tut from the begining. I explain everything very simply and if your stuck then just post and i will resolve any problem

i promise if you have 1 ounce of intel then you wont find the tuts too difficult and you will see the light

cjbigboy
01-05-2007, 02:48 PM
i could put together some php pages that can do this for you, with an explanation, if you like or is the website development to far ahead that changing languages would be of no use?

Hi

Yes, site development is too far ahead to change language.

I can get the page to loop through the categories ok, but then I need each category to display a sub-cat before a details page.

Perhaps I'm barking up the wrong tree


thanks again

CJ :)

lux
01-05-2007, 02:57 PM
how have you set your database up? is there only one table at the moment?

cjbigboy
01-05-2007, 03:02 PM
Two Tables.

one to show the categories, then the other to show the specific data. In the second table, there is a catgories field that is linked to the categories table.

ta

CJ

lux
01-05-2007, 03:10 PM
cool,

1. create a file called categories.asp.
2. in this file use dreamweaver to create a recordset of categories and display in a table or list
3. make them hyperlinks to subcategories.asp and include the asp code to send the category id in the url ( you must have done this already to display the details page from the master page)
4. create a new page called subcategories.asp where you will create a record set that will list all the subcategories WHERE category id (from the category table) = id passed in the url. (you should have something similar in the details page you already have, the only difference will be that you need to join the two tables to display the correct results.

*if i have left anything out or make a mistake davidj please correct me, cheers

let me know if you need more help

cjbigboy
01-05-2007, 03:38 PM
Looks good, I'm off to the pub now, lol
But will look at this in the next day or so hangover permitting.

Really appreciate your help on this one. No doubt I'll be stuck again and will let you know.


cheers

CJ :-D

davidj
01-05-2007, 03:40 PM
the only difference will be that you need to join the two tables to display the correct results.



in access you can just build a hard query which will do the join for you

just reference that query table in you details

cjbigboy
01-08-2007, 12:40 PM
cool,


3. make them hyperlinks to subcategories.asp and include the asp code to send the category id in the url ( you must have done this already to display the details page from the master page)
4. create a new page called subcategories.asp where you will create a record set that will list all the subcategories WHERE category id (from the category table) = id passed in the url. (you should have something similar in the details page you already have, the only difference will be that you need to join the two tables to display the correct results.



Have tried this out and in my head it makes sense, but unfortunately as a newbie putting the above into practise is another matter.

When I created the other master detail page in DM it was done from the Insert --> Application Objects window so everything was pretty much done for me. I have created a category.asp page which lists all the categories in the category table. I know how to create links but how to send the category ID in the url is where I'm stuck.

as to 4. not sure either

thanks once again

regards

CJ

cjbigboy
01-12-2007, 08:44 AM
Have since added a dynamic form to the master page that returns only the required records, then goes to the detail page.

Once again thanks for all your help

cheers

CJ :-D