?
Solved

WHat's the best way to have 3 tables present in PHP webpage and display each row as top tables row is selected

Posted on 2011-09-11
17
Medium Priority
?
248 Views
Last Modified: 2012-05-12
We're trying to develop a web page where we can have 3 related tables contents displayed simultaneously in a wb page using PHP. As the top row is selected, the second part of the window displays the related rows.  Also, when selecting a row within the second table, the 3rd section will display the contents related.

Whats the best way of going about it?
0
Comment
Question by:rayluvs
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
17 Comments
 

Author Comment

by:rayluvs
ID: 36519865
More info...  the attached Pic shows how we want to manage ths display.

The web page consist of a 3 part windows, relating each window to a specific table.  For sake of discussion, the Pic attached represent a Family database.  Where we choose the part of the family (Dad, Mom, etc.).  When selected, the second window display all related rows for that specific Family Members, in case the cities which the family member visited.  Finally, we choose the city and the 3rd window will display the phone numbers of the city the family member visited.

Though the example may sound  illogical, the table relationship presented is what we are trying to display on the web page.
 ee1
0
 
LVL 7

Expert Comment

by:boon86
ID: 36521255
can you show the database and table structure that require?
0
 

Author Comment

by:rayluvs
ID: 36521302
Database:

     - Family

Tables and their columns:

      Families
            Id
            FamilyName

      FamilyMembers
             Id
             FamiliesID
             FamilyType

      CitiesVisited
             Id
             FamilyMembersID
             City

      PhoneNumbers
             Id
             CitiesVisitedID
             PhoneNumbers

0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 111

Expert Comment

by:Ray Paseur
ID: 36521721
There are a lot of moving parts to your question.  I think you might want to start with the data base queries and make sure those work correctly.  Then for the presentation layer, you will want some kind of AJAX front end, perhaps http://docs.jQuery.com/Tutorials
0
 

Author Comment

by:rayluvs
ID: 36522660
Yes, we have the queries.  We have it in VB.

We know very little of Ajax (can u give us a brief of what it is?)

Also, can interpret that this kind of screen cannot be done in PHP?
0
 
LVL 111

Accepted Solution

by:
Ray Paseur earned 1000 total points
ID: 36523670
Here is a good reference on Ajax.
http://sixrevisions.com/ajax/20-excellent-websites-for-learning-ajax/

As to the question of whether this can be done in PHP, the answer is "yes" but it also requires JavaScript if you want the selection and changes to be accomplished without a page load.  Since I see no submit controls on the image of the page I expect that is what you want.
0
 

Author Comment

by:rayluvs
ID: 36527300
you are correct, forgot to include submit button.

Also, seeing what we want, I think I placed the problem a bit wrong.  The phone numbers areas is not a display, it's supposed to be the data entry area.  After we enter the 'Families', 'FamilyMembers' and 'CitiesVisited' we start adding or entering phone numbers.

So in the Pic we included at first, the phone numbers area, its supposed to be data entry.  But before entering any phone numbers, the user has to choose the Family, Familymember and the city.

Based on this, do we still need Ajax?



PHPmultipleWindows.wSubmitButton.jpg
0
 
LVL 111

Assisted Solution

by:Ray Paseur
Ray Paseur earned 1000 total points
ID: 36529007
AJAX is a design choice, not a hard-and-fast requirement.  You could just as easily let the client make the selections one-at-a-time, loading a new form page after each selection.  But that kind of page-to-page chain is kind of old school.
0
 

Author Comment

by:rayluvs
ID: 36529604
Just make sure before entering into the whole AJAX research, the image we prepared to let EE understand what we want (see ID: 36527300), is AJAX the only solution for this?
0
 
LVL 111

Expert Comment

by:Ray Paseur
ID: 36529624
Please see ID:36529007.  AJAX is a design choice and not the only solution.

Suggest you use the Request Attention link and ask a moderator to add this question into the JavaScript Zone.
0
 

Author Comment

by:rayluvs
ID: 36529723
I know.  Prior concentrating on searching and learning on the resources on which to use, would like to know which is less complicated.  On your experience, and on what you've read here, should we direct our resources to AJAX?  (we never used AJAX, new term for us.  We have done some javascript though).  Just want an experience advice prior starting to direct all our resources to which to use.
0
 
LVL 82

Assisted Solution

by:leakim971
leakim971 earned 500 total points
ID: 36583935
yes Ajax is the best choice for what you want to do.

you just need a script byt table to return content of a table depending a parameter (the ID of the previous table)
the top table/list don't need any parameter

each script can return directly the items, an array, xml data or json data
0
 
LVL 70

Assisted Solution

by:Jason C. Levine
Jason C. Levine earned 500 total points
ID: 36584008
0
 

Author Comment

by:rayluvs
ID: 36586423
Thank you very much! This is a goi start direction.  Let me review it prior closing the question
0
 

Author Closing Comment

by:rayluvs
ID: 36718681
Thanx
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There are times when I have encountered the need to decompress a response from a PHP request. This is how it's done, but you must have control of the request and you can set the Accept-Encoding header.
Ready to get certified? Check out some courses that help you prepare for third-party exams.
Any person in technology especially those working for big companies should at least know about the basics of web accessibility. Believe it or not there are even laws in place that require businesses to provide such means for the disabled and aging p…
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.
Suggested Courses

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question