!!! NOTICE: I suggest to use my other Class phpSortable under the site http://www.phpclasses.org/browse/package/3704.html. It is better and has a Database abstraction feature. I keep this package always updated, but not the phpSortTable.
This class can be used to display MySQL database query results in HTML tables with columns that can be sorted.
It executes MySQL queries and generates an HTML table to display the results.
The table headers show the result column names as links that the user can click to execute the query again sorting the results by the clicked column.
Each row may have optional columns with links to other pages, like for instance to edit and delete the table row.
The table may be limited to a given number of rows per page using additional links to browse multiple pages of results.