I was browsing through the site looking for a functional example of pagination with AJAX + PHP, when I found this example
Sorry for my ignorance, but the 'asynchronous loading' of AJAX causes me doubts ..
However, I had a question: In the script, there is a limit made by AJAX of 6 records to be displayed per page. Above all, there is no limit if I make a SELECT * FROM tabela
. So it was assumed that if there are 500 records in the table, they will all be loaded but only displayed six per page? Would not this slow down the flow of the site? I say the loading time?
Another question: How can I change the array in the example by a SELECT
, so I can use a mysqli_fetch_array
to fetch each row of the record?
Note: If necessary, I'll be posting the code (which is somewhat extensive) for better visualization.