|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Article Discussion: Sorting the Easy Way
I bet most of us have at one point or another have developed an application where a list of products were retrieved from a database and shown in a table with their name, price and code. So we placed a cute little icon near each column's header that linked to the search page with a flag in the URL to let it know we wanted the results ordered by name or price. The search script kindly did its job, adding the ORDER BY clause, and the ordered results were shown to the user. Obviously this method works, but there is a problem: Why must we bother the server again to retrieve the same results that are now held in the browser, only in a different order? This article will show you the quickest way to order your database results, via JavaScript, with some work in PHP.
Read the full article here: Sorting the Easy Way |
|
#2
|
||||
|
||||
|
not bad, but...
I'd recommend reading the code at the following script, much better than this article since it's not using javascript in the html markup, following the principles of unobtrusive DHTML:
http://www.kryogenix.org/code/browser/sorttable/ improves the methodology used by Erik at http://webfx.eae.net/dhtml/sortable...tabletable.html (which adds some minor javascript to the html, but not that much as here) ![]() |
|
#3
|
|||
|
|||
|
both of articles made some valid points
__________________
Wedding Gifts | Web Development | Order Fulfllment | Supply Chain | E-Business | Add to 100 SEO Friendly Directories fast do it yourself |
![]() |
| Viewing: Dev Shed Forums > Other > Development Articles > Article Discussion: Sorting the Easy Way |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|