I am currently using a javascript table script called tableFilter, which works for the purpose I originally needed which was simply displaying data with the ability to filter and sort. Now I need one more function which is the ability to swap rows and save the new order to the mysql table. For example if the table is books, and the list of books is shown with a column rank and the grid is sorted on rank, if the user swaps 2 rows I want the new rank of the swapped rows to get saved to the mysql table. I looked a jqGrid and I like the look and functionality of the grid, but I do not see how they would change the rank in the grid and then save it to the database. Can someone direct me in the right direction towards a script or idea for this?
You will need to look for the JS plugin which allows using callback function after some user actions. Usually, it's called something like "onSuccess" or "afterSort" and is specified in the grid-plugin documentation you're going to use.
For example, after you sort data in table, plugin will execute your function. In this function you will need to set up an AJAX request your script which will insert some data into your database.
Unfortunately i can't recommend some plugin to you as i don't really use anything like this.