Solved

PHP - passing massive amount of data

Posted on 2011-03-23
2
299 Views
Last Modified: 2012-05-11
My situation looks like this , i have a search screen where users enter search criteria, submit it
to the database and get the result. It could be even hundred thousand records.
User can select some or all of the records and go to next screen
Now on the next screen I want to show the details for each record one at a time, with  controls allowing to go to the next record. What is the best method to pass selected records on the previous screen ?. Save them to a file ?.
0
Comment
Question by:Rozamunda
2 Comments
 
LVL 9

Accepted Solution

by:
sshah254 earned 250 total points
ID: 35202962
It depends on what you have and what you are dealing with.

Normally, one would not pull up all the data on the first screen ... only minimal data should be pulled up for the user to make selection of what she wants.

Once the selection is mad, some sort of identifier would be picked up and another call would be made to the db to retrieve all the necessary information on the second screen.

You can either do multiple calls ... or store the retrieved data in a file ... or session.  But if it is too much data, then you are asking for security / performance problems.

Ss
0
 
LVL 9

Expert Comment

by:AriMc
ID: 35202965
Passing hundreds of thousands of records to a single web-page doesn't sound like a good idea simply because it will take too much time to transfer the information from your server to the client and because the user will definitely not go through that kind of amount of data.

Traditionally in these situations the search outputs an error message saying something like "More than X records found, please refine the query" and then allow/force the user to do so.

0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Foreword (July, 2015) Since I first wrote this article, years ago, a great many more people have begun using the internet.  They are coming online from every part of the globe, learning, reading, shopping and spending money at an ever-increasing ra…
Part of the Global Positioning System A geocode (https://developers.google.com/maps/documentation/geocoding/) is the major subset of a GPS coordinate (http://en.wikipedia.org/wiki/Global_Positioning_System), the other parts being the altitude and t…
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

813 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

15 Experts available now in Live!

Get 1:1 Help Now