I am using php mysql.
First on form submission I run query on mysql and get the row id -> store it in session array.
For displaying the result I have modified one php array pagination script to create pagination of session array with first,prev,next,last, Jump to page number functionality. For that pagination I have taken the reference from:
http://lotsofcode.com/php/php-array-pagination.htm
Script is working fine.
But I have two questions.
Question 1: Is it fine to store big result in session array? if not
what will be the good alternative for that? (I am wondering to keep
first 500 result in session array and if result result is more than
500 then create one xml file.)Question 2: Is it possible to use ajax for pagination working with
session array and having functionality of first,prev,next,last, Jump
to page number?
If any solution is there please update me.
Thanks
Ravindra.
I wouldn’t use sessions to store large amounts of data, and I wouldnt use sessions to store data returned from a table (mysql or otherwise).
The session data is stored on the server – and held within memory – whats going to happen when you get multiple users using the same table ?
The database (mysql or otherwise) should be sufficient enough, with the correct indexes in place, to handle queries for displaying data.
I have a mysql table with 120 million records and can extract data quickly using date ranges – no speed issues what so ever.