WordPress.org

Ready to get started?Download WordPress

Forums

Contact Form DB
[Plugin: Contact Form 7 to Database Extension] orderby numeric (3 posts)

  1. lewster32
    Member
    Posted 2 years ago #

    I am trying to order shortcode results numerically, however despite in the changelog stating that filter operations now try to do numeric comparisons, the same does not appear to be true for 'orderby'. Entirely numeric columns are still being returned (and thus sorted) as strings. Is there any way the plugin can either auto-sense numeric columns, or that I can specify that an orderby column is numeric myself?

    http://wordpress.org/extend/plugins/contact-form-7-to-database-extension/

  2. Michael Simpson
    Member
    Plugin Author

    Posted 2 years ago #

    You are correct. I had a look at the code. "orderby" is being turned into a "ORDER BY" clause in the SQL query to the database which has fields stored as strings. I'll look into a finding a way to handle it both ways.

  3. aidenb
    Member
    Posted 2 years ago #

    Hey guys, did you ever resolve this? I need to orderby numerical value.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic