RE: [PHP] RE: [PHP-WIN] Dynamic HTML table sort with PHP
Thanks for the reply - I will definitely look at the link you provided! I currently did get this working smoothly in pure PHP, but this obviously creates more overhead and a query is run on the DB everytime a column is clicked to get the sorted data back. This is for an internal app. that likely will not make extensive use of the sort though. Thanks! Ken Vandegrift [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] Web Administrator Sharis Mgmt. Corp From: Shafiq Rehman [mailto:[EMAIL PROTECTED] Sent: Sunday, July 09, 2006 10:09 PM To: Vandegrift, Ken Cc: [EMAIL PROTECTED]; php-general@lists.php.net Subject: Re: [PHP] RE: [PHP-WIN] Dynamic HTML table sort with PHP Hello, Why not you use the javascript to sort any column on client side. http://www.kryogenix.org/code/browser/sorttable/ 1. include the js file in your page 2. give your table an id 3. put your table in the class the code looks for. That's it. Sortable clientside tables! Example: http://pkfinance.info/analysis/ Hope this will help! Regards Shafiq Rehman Sr. Web Engineer http://www.phpgurru.com
Re: [PHP] RE: [PHP-WIN] Dynamic HTML table sort with PHP
Hello, Why not you use the javascript to sort any column on client side. http://www.kryogenix.org/code/browser/sorttable/ 1. include the js file in your page 2. give your table an id 3. put your table in the class the code looks for. That's it. Sortable clientside tables! Example: http://pkfinance.info/analysis/ Hope this will help! Regards Shafiq Rehman Sr. Web Engineer http://www.phpgurru.com
Re: [PHP] RE: [PHP-WIN] Dynamic HTML table sort with PHP
Shafiq Rehman wrote: Hello, Why not you use the javascript to sort any column on client side. Because that might not sort all of the data. If you only show 20 records per page, then that will only sort those 20 records (ie the records inside that page), it won't sort the other 1,000 records by name or whatever other fields you specify. If I have: Albert Alex Chris Fred Henry Joe Trevor in the list, and I show 3 per page, it would be: Albert Alex Chris and I sort descending, it would show Chris Alex Albert which isn't right, it should be Trevor Joe Henry -- Postgresql php tutorials http://www.designmagick.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php