?
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
?
250 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
15 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
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
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 83

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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

This article discusses how to implement server side field validation and display customized error messages to the client.
Without even knowing it, most of us are using web applications on a daily basis.  In fact, Gmail and Yahoo email, Twitter, Facebook, and eBay are used by most of us daily—and they are web applications. We generally confuse these web applications to…
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).
Suggested Courses
Course of the Month17 days, 13 hours left to enroll

831 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