Column sorting – server side (Should know)
With a reasonably-sized record set, client-side table sorting is a nice option. But if there are too many records, browsers might buckle under the strain. In those cases, let the server do the work and sort with AJAX.
As with the previous recipe that dealt with AJAX, we won't delve into the server-side code. I trust that you've got your favorite server-side language and database, and know how to set them up.
The initial setup for this chapter is exactly the same as it was for the previous recipe. Stick with the table of top movies. Assume a database table with columns Ranking, Movie, and Release Year.
How to do it...
- As usual, create a table with a unique ID. As with the previous recipe, clicking ...