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

  1. lewster32
    Posted 4 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?


  2. Michael Simpson
    Plugin Author

    Posted 4 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
    Posted 4 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

  • Contact Form DB
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic