Jump to content

Tablesorter in the databases


MPM

Recommended Posts

Hey Peter or Xena (or some new coder that I don't know about),

A forum post brought this to my attention. It looks like you've began using tablesorter to sort results in tables.

While this is a great tool, it isn't suited for every situation.

 

Good: Tables that have all their data displayed on one page.

Bad: Tables that are paginated.

 

I noticed you're using tablesorter on database results. If you sort those results, you only sort the displayed page.

 

Example:

http://www.tip.it/runescape/items?keywords=black&players=all&tag=all&tag2=all

First item is "Axe head - Black".

Last item on the page is "Black gold-trimmed armour set (lg)"

Last item in the results is "Worn-out black gauntlets".

 

On the first page, I would expect that if I sorted the name column in reverse order, the first item would be "Worn-out black gauntlets". However, it's "Black gold-trimmed armour set (lg)".

 

If you wouldn't mind a suggestion to the solution, I'd use DataTables. I've used it in a few places at work and it works just fine.

It'll require a little tweaking to get the ajax stuff working securely, but it isn't hard to do.

~M

Link to comment
Share on other sites

Yeah we actually know about this already, tablesorter can load data with AJAX but it seems a bit unnecessary. In most cases where the tables are paginated we use a MySQL sort though, this probably just needs the same.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.