We're Moving to a New Support Platform – Starting June 1st!

We’re excited to let you know that starting June 1st, we’ll be transitioning to a new support system that will be available directly on our product websites – Amelia, wpDataTables, and Report Builder. In fact, the new support platform is already live for Amelia and wpDataTables, and we encourage you to reach out to us there.

You'll always be able to reach us through a widget in the bottom right corner of each website, where you can ask questions, report issues, or simply get assistance.

While we still do not offer live support, a new advanced, AI-powered assistant, trained on our documentation, use cases, and real conversations with our team, is there to help with basic to intermediate questions in no time.

We're doing our best to make this transition smooth and hassle-free. After June 1st, this current support website will redirect you to the new "Contact Us" pages on our product sites.

Thanks for your continued support and trust – we’re excited to bring you an even better support experience!

Okay
  Public Ticket #2920914
sorting
Closed

Comments

  • Freddie Cheung started the conversation

    In my SQL table, i have a filterable column of strings organised in the sequence of :

    1.0

    1.1

    1.2

    .

    .

    .

    2.0

    2.1

    ..

    18.0

    18.1

    ...

    i would like to human sort i.e. in the above order instead of :

    1.0, 1.1, ...10.0, 10.1,....2.0, 2.1,........

    is there any way to achieve this?

  •  1
    Sue Hemmens replied

    While you're waiting (I know the team at TMS are short-handed due to covid) have a look at this post on stackoverflow, might help https://stackoverflow.com/questions/153633/natural-sort-in-mysql

  •  472
    Isidora replied

    Hi Freddie,

    Thank you for your purchase.

    Sorry for the late response, we have some agents that have contracted Covid-19, so our team is cut in half.

    Yes that is default behavioral for sting columns. Like Sue suggest you have to adopt this with some custom query and some of the solutions you can find on link that Sue provide. 

    One more suggestion is to check those queries in your database tool(phpmyadmin or what every you use) and when it is returning data that you need pelase create a view so you will avoid issues with server side options like filtering, searching.. because wpdatatables have dynamic logic for recreating queries and when your initial query is complicated this can provide not proper rendering and will throw no results.

    Thank you Sue for help.

    Best regards.

    Kind Regards, 

    Isidora Markovic

    wpDataTables: FAQFacebookTwitterFront-end and back-end demoDocs

    Amelia: FAQFacebookTwitter |  Amelia demo sites | Docs

    You can try our wpDataTables add-ons before purchase on these sandbox sites:

    Powerful FiltersGravity Forms Integration for wpDataTablesFormidable Forms Integration for wpDataTables

  •   Freddie Cheung replied privately
  • [deleted] replied

    Hi Freddie

    This is a bit too complicated query to be handled simply by wpDataTableas so please prepare a MySQL view (a stored query), which will return the data that you need, call it e.g. “view1” and then build a wpDataTabled based on a simple query like “SELECT * FROM view1″.

    Please note some this when working with the server-side processing feature:

    • Please do not use “LIMIT” in the SELECT statement. wpDataTables adds it automatically and it will be overridden.
    • Please do not use “ORDER BY” in the SELECT statement. wpDataTables has its own sorting engine so it makes no sense to use MySQL’s sorting, since it will be overridden. Also, server-side processing feature adds this part of statement automatically when users trigger the sorting on the front-end, and having it in initial statement may cause the table to crash.