We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 5301
    • 25 Posts
    Hi Experts,

    I have a tab on the browser inside the tab contains a table, a table of files.
    Tthese files are in MySQL.
    I like to be able to sort based on dates or title of the files
    Should the sort be done on MySQL and then transfer the result back to the browser
    or should i perform the sort of the browser without interacting with MySQL

    Which is a better approach ?

    Thank you very much.
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      Depends on how big this table gets. For a few items, it’s probably better to do it with the query. For more than a dozen or so, I would use a sortable AJAX grid. There are tons of those out there. Here’s the one I did.

      http://www.sottwell.com/article-extjs1.html
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org