Behind the Scenes Querying (HELP ME!)

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
bwv2
Forum Commoner
Posts: 83
Joined: Fri Jun 10, 2005 11:50 am
Location: AZ

Behind the Scenes Querying (HELP ME!)

Post by bwv2 »

I'm having a little issue with querying a large table. I need to extract some data that corresponds to the user's coordinates. When they enter the coordinates, the query is sent to a mysql database and picks out some info from a table.

Trouble is that my table is about 7.5 million fields, so it takes a couple of minutes to obtain the result.

I haven't finished the application yet, but I want to know if the user can immediately continue as soon as they press "submit" and have the query happening behind the scenes as they continue on filling out additional information. I won't need the actual variables generated by the query until a couple of pages down the line, so I can spare the time for the query. I just don't want the page to be loading for 3 minutes while it's happening. Will this work, or is there something else I have to do to get the "behind the scenes" query to happen?

Thanks.
User avatar
Burrito
Spockulator
Posts: 4715
Joined: Wed Feb 04, 2004 8:15 pm
Location: Eden, Utah

Post by Burrito »

you could use a hidden iframe or some such, but it'd be tough to have their experience continue on the same page.
djot
Forum Contributor
Posts: 313
Joined: Wed Jan 14, 2004 10:21 am
Location: planet earth
Contact:

Post by djot »

I would use sessions or cookie, store the information that session_xy has started the db-query. Later on, while the user is browsing other pages you may check, whether the users db-query has already finished and fetch the relavant information then.
Post Reply