[jQuery] Re: In a pickle -- JavaScript Pagination vs. PHP/MySQL Pagination

2009-01-08 Thread Eric Garside
I've always been a big fan of javascript for doing any pagination. Firstly, because it allows live, comparatively fast sorting of results. Secondly, because mysql is a bunch faster if it's not ordering or filtering results itself, and rather just returning a chunk of them. Thirdly, it's a lot less

[jQuery] Re: In a pickle -- JavaScript Pagination vs. PHP/MySQL Pagination

2009-01-08 Thread ripcurlksm
Could you post some example code if you get the chance Jeffrey? Jeffrey Kretz wrote: > > > I solved this for my own project in this way: > > 1. Server-side code renders the first page of the grid, also passing a > value of total results. > 2. If the total results are few enough (season to t

[jQuery] Re: In a pickle -- JavaScript Pagination vs. PHP/MySQL Pagination

2009-01-07 Thread chris at zeus
I would take this a step further and suggest cutting out a lot of headache in your code by using a php framework to manage a lot of the functions you want to use. I would check out codeigniter.com. CI has pagination and db helpers so you don't have to write all the code yourself. On Jan 7, 8:38

[jQuery] Re: In a pickle -- JavaScript Pagination vs. PHP/MySQL Pagination

2009-01-07 Thread tlphipps
Just to follow this up a little, I'm guessing the slow loading you see has nothing to do with MySQL and everything to do with trying to load 800 rows worth of data into the browser. So I would guess that your option 1 would not give you any advantage since the browser would still take several sec

[jQuery] Re: In a pickle -- JavaScript Pagination vs. PHP/MySQL Pagination

2009-01-06 Thread Ricardo Tomasi
You must have a really HUGE table/database. I'm don't know much of MySQL but I think even a million records query returns in less than a second on an average server. Couldn't you be loading just the 40 first rows, and if you need to sort it the other way, load the 40 at the other end (with a diff

[jQuery] Re: In a pickle -- JavaScript Pagination vs. PHP/MySQL Pagination

2009-01-06 Thread Jeffrey Kretz
I solved this for my own project in this way: 1. Server-side code renders the first page of the grid, also passing a value of total results. 2. If the total results are few enough (season to taste), fire an ajax call that immediately loads the entire result set into memory. 3. As the user re-s