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
241 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
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
 
LVL 108

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 108

Accepted Solution

by:
Ray Paseur earned 250 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
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 108

Assisted Solution

by:Ray Paseur
Ray Paseur earned 250 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 108

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 125 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 125 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 Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Why do we like using grid based layouts in website design? Let's look at the live examples of websites and compare them to grid based WordPress themes.
Envision that you are chipping away at another e-business site with a team of pundit developers and designers. Everything seems, by all accounts, to be going easily.
Viewers will get an overview of the benefits and risks of using Bitcoin to accept payments. What Bitcoin is: Legality: Risks: Benefits: Which businesses are best suited?: Other things you should know: How to get started:
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

743 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now