Jump to content

Temporary storage for database request


jeremiorama

Recommended Posts

Hi there!

 

I'm having a little problem here dealing with a MySQL database, but this question is not about MySQL, so I posted it here.

 

What I'm trying to do is keep a database request in a temporary storage place (if it can be done) so that I can use the data put there while the user surfs the web site.

 

O.K. To be a bit more understandable, let's put it that way:

The user has several choices, and when the user clicks on one, a request is made to the database and the data is put in an array (sometimes big arrays). I would like this array to be kept, so the user can continue browsing and does not need to reload it all the time he needs to access to it, let's say, when he turns the pages of the contents or when he decides to come back to its initial choice.

 

If you have any questions, let me know.

 

Thanks for your help!

 

-jeremiorama

Link to comment
Share on other sites

Ok, just some more questions. I know this forum is about PHP but since MySQL is it's most used database, then i'll just ask, if anyone knows.

 

Let's say I receive 100 results from the database with my query. I put 10 results per page. What should I do so that I do not need to reload the same query all the time and only show 10 of the 100 results given everytime?

 

I was thinking of putting it in an array, and save this array, so that the user can "turn" the pages and would not query the database anymore.

 

But I could get results like a year's registry of a company phone calls, so I think cookies would not do it, would they?

 

Thanks,

 

-jeremiorama

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.