Answered
Loop Problem
Hi,
I have two tables, a sites table and a pages table (below). I'd like to list the sites and when a user clicks a site link, I'd like to display the pages for that site underneath the site link as a list. Its a very basic CMS of pages within sites.
If I could use a javascript hide and show to display the submenus, that would be great.
Could anyone tell me how I I do this with one query and display this on my page, could I use the group by attribute?
Can anyone tell me how I can do this with one query?
sites table
siteid -PK
sitename
pages table
pageid -PK
siteid - FK
pagebodytext
pagesummarytext
I have two tables, a sites table and a pages table (below). I'd like to list the sites and when a user clicks a site link, I'd like to display the pages for that site underneath the site link as a list. Its a very basic CMS of pages within sites.
If I could use a javascript hide and show to display the submenus, that would be great.
Could anyone tell me how I I do this with one query and display this on my page, could I use the group by attribute?
Can anyone tell me how I can do this with one query?
sites table
siteid -PK
sitename
pages table
pageid -PK
siteid - FK
pagebodytext
pagesummarytext
