Support » Plugin: Participants Database » Natural sorting (MySQL)

  • Hello Roland!
    Thank you again for this awsome plugin, I’ve been using it for quite some time and it works like a charm 🙂
    I have some issues, though, but those are due to my limited PHP skills which are rather basic (but I’m working on that).
    Now, the question(s): is there a way to customize list sorting so that records are displayed in natural order. I have a mysql query that does that, but I don’t know how to implement it. The fields I intend to use for sorting are ‘varchar’ and the query looks like this:

    SELECT name, surname, option, colmn FROM wp_participants_database
     ORDER BY option ASC, SUBSTR(colmn FROM 1 FOR 5), CAST(SUBSTR(colmn FROM 6) AS UNSIGNED), SUBSTR(colmn FROM 6);

    Any help or advice would be greatly appriciated. I found a similar topic here, but the answer(s) doesn’t do the trick.
    One more thing: strict search seems to be ON all the time. By that I mean case sensitive search. I tried turning it on and off in the Advanced settings section, but it works only if I input ‘John’ while ‘john’ query returns ‘no records found’. Maybe this is a question for another topic. If so, please ignore it, I will open topic with that question.
    Thank you in advance.
    Greetings from Croatia 🙂

    https://wordpress.org/plugins/participants-database/

  • The topic ‘Natural sorting (MySQL)’ is closed to new replies.