Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3

Thread: sortable table

  1. #1
    Senior Coder
    Join Date
    May 2004
    Posts
    1,441
    Thanks
    15
    Thanked 0 Times in 0 Posts

    sortable table

    before i rewrite what's out there does anyone know of any opensource or free code that takes a mysql query and creates a sortable html table

  • #2
    New to the CF scene
    Join Date
    Feb 2007
    Location
    Utah
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts
    It really depends on what you want. If you want the table sortable in the client, then yeah, there are lots of javascript libraries that will do what you want.

    http://kryogenix.org/code/browser/sorttable/ (first hit on google)

    However, if you want to write a sortable table sorted by an HTTP request to PHP, then chances are you should write your own. Tables are all so different and the components doing the sorting could be PHP or SQL (Depending upon speed requirements). Additionally, if you have pagination, uh, well, you should probably write your own anyway.

  • #3
    Senior Coder
    Join Date
    Jan 2007
    Posts
    1,648
    Thanks
    1
    Thanked 58 Times in 54 Posts
    It's possible to write a general purpose table generator. I have one and it is quite a useful tool. Like mentioned, you can add automatic pagination, and checkboxes for when the user needs to select 1 or multiple rows.

    Just remember to keep markup out of the generator. Use CSS to markup the table (give a generic class to the table itself, the rest you can do with selectors).


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •