Let's assume for following structure:
A table with two columns: id, name.
Let's assume the table consists of thousands of rows.
I have a search engine that allows me to search by free text.
The query I use to retrieve the data is as following:
SELECT * FROM `table` WHERE `name` LIKE '%$search%'
Let us also assume that the entire results are saved as associative
array in a variable name $results
.
I want to display them in a CSS designed html table (This is important because it slows the browser data loading).
Now, I have 2 options here:
Load all the thousands of results into the same page at once, and use the "display" to change between "pages".
Or,
I could with ajax for example, make a different search for each number I click that changes a the "LIMIT TAB_NUMBER*NUM_OF_RESULTS_PER_PAGE, NUM_OF_RESULTS_PER_PAGE"
.
Anyone got better idea?