eaglesphan Posted April 2, 2004 Share Posted April 2, 2004 I have been working on a directory project as my first foray into PHP. I have DWMX2004. This is what I've done so far.... I have a table set up in MySQL that lists the usual stuff (name/phone/email/department/location, etc). So far I have created a page that lists the letters of the alphabet as 26 radio buttons in a form. When a person clicks on the letter A and sends it, all the people whose last name starts with A appear in a table on the same page. All of this works just fine. I have managed to create an admin page, an input page, an update page, and a delete record page and they all work. So far so good. Now for the fun part and this is where I'm stuck. I now want to create a page that lists all of the departments along with each's phone number and a link to that department's home page AND a link to the directory. The idea is that maybe you're looking for contact information for a person but you can't remember their name (therefore the alphabet page is usless to you). But you do know where they work. So you go to the department page, click on the directory link next to that department's name and voila, you have everyone listed in that department so you can pick out who you were looking for. It looks similar to this: President's Office Phone# Fax# Home link | Directory link Vice Pres's Office Phone# Fax# Home link | Directory link and so on After pondering on this problem, I thought maybe I should separate the department info from the original table and create another table. I now have a flat file ready listing all the department/phone/fax along with an identifying number for each. I am stuck in that I'm not sure how to pass the department number information to the database via URL to pull out what I need. If I have 75 different departments listed on the same page, does that mean I have to have 75 different recordsets - one for each link? Or can one recordset do the job but in that case, how do I make each link unique based on the department number without using a form w/radio buttons? If I go the master/detail page route, would that work seeing as how the detail I'm wanting can be over a dozen records rather than just one? I can see calling the department listing page the master page but I thought the detail page only had one record. Also, I don't want to list the department page according to department number or alphabetically. It needs to be listed according to an organizational structure that makes it difficult to pull it from a database in any sensical way so I can't create that page using a recordset. I hope this is making sense so ya'll know how to point me in the right direction. Quote Link to comment https://forums.phpfreaks.com/topic/1773-masterdetail-with-url-parameters/ Share on other sites More sharing options...
morpheus.100 Posted April 3, 2004 Share Posted April 3, 2004 Yes it would. You can specify exacttly how many records to show maximum. Use the server behaviours panel recordset to wizard to pass the parameter to the next page. The options are in the list boxes. If you press F! there are detailed walkthroughs on how to achieve tihe kind of thing you aim to do. Look in the developing php aplications readily section. Quote Link to comment https://forums.phpfreaks.com/topic/1773-masterdetail-with-url-parameters/#findComment-5795 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.