Okay
  Public Ticket #3769838
wpDataTables integers sorting like text
Open

Comments

  • Jim Allen started the conversation

    Columns are not sorting properly. When I sort the "g" column in descending order, 99 appears before 101 as one can see in the attached screen shot.

    Attached files:  G sort.PNG

  •   Miloš replied privately
  • Jim Allen replied

    Miloš,

    The column's data type was set for integer. As a test, I changed it to string, saved it, and then returned it to integer, saved it and, unfortunately, sorting in descending order the highest value is 99, when there are values of 100 and higher.

    Jim

  • Jim Allen replied

    All the other integer columns sort normally. The MySQL original is also integer for all integer fields.

  •   Miloš replied privately
  • Jim Allen replied

    Miloš,

    I have uploaded the zip file to Google Drive, since WeTransfer's page was not working properly and it was taking forever to attach here. Here is the link:

    https://drive.google.com/file/d/1FL6dvuw7S-DN_QtozmHRrJv88PKZij8f/view?usp=sharing

    The wpDataTables query is the most basic: 

    select * from catchers_cs

    That's it, I think.

    Jim


  • Jim Allen replied

    Miloš,

    No luck solving my problem? Would it help if I sent you the original cvs file to see if you can get a different result?

    Perhaps my installation has been the problem.

    Jim

  •   Miloš replied privately