corillo181 Posted November 28, 2007 Share Posted November 28, 2007 which would you consider the best way of doing pagination? by putting the result in a array or by using mysql. right now i have it with mysql but i was thinking about putting all result in a array and then do the paging threw an array, but i dont know about speeds in php. which way would be faster? Quote Link to comment Share on other sites More sharing options...
pocobueno1388 Posted November 28, 2007 Share Posted November 28, 2007 The information is already stored in an array when it comes out of the database, why would you restore it in a different one? Quote Link to comment Share on other sites More sharing options...
deadimp Posted November 28, 2007 Share Posted November 28, 2007 It would be better to do the pagination through MySQL LIMITs. That way is more efficient, since the MySQL server only sends you only the data you use to your script - much better than having it send you all of the data, and then cropping it off and leaving it for garbage collection. Quote Link to comment Share on other sites More sharing options...
corillo181 Posted November 28, 2007 Author Share Posted November 28, 2007 thank you deadimp, thats the answer i was searching for. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.