Title: Sorting numerically
Last modified: August 20, 2016

---

# Sorting numerically

 *  Resolved [bw3em](https://wordpress.org/support/users/bw3em/)
 * (@bw3em)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/sorting-numerically/)
 * Before I attempt to change the db directly, can you advice if this will work 
   first?
 * I want to sort by height and we list them as follows: `6' 0" (183cm)`
    Will changing
   TINYTEXT to DECIMAL (as per Other Notes) keep it as such?
 * Last week I made the mistake of changing my age range (e.g. `25-30`) to numerical
   and it would only show ’25’. Now this has changed all my records and I have to
   manually change them back 🙁
 * I’m not sure I understand the LENGTH/VALUES!
 * Cheers,
    Em
 * [http://wordpress.org/extend/plugins/participants-database/](http://wordpress.org/extend/plugins/participants-database/)

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Author [Roland Barker](https://wordpress.org/support/users/xnau/)
 * (@xnau)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/sorting-numerically/#post-3571809)
 * Em,
 * The length values are simply this: this first value is the number of place before
   the decimal point, the second number is the number of places after it. So, for
   an integer of no more than 99, you would use 2,0
 * Sorting numerically by height is another thing entirely. Numeric sorts only work
   for numbers, so you can’t have any unit characters…and you can’t mix units. So,
   if your height measurements were all in centimeters, you could do it, but you
   couldn’t include the “cm” it would just be the number.
 * If you wanted to do feet and inches, you’d have to get kinda tricky and store
   all your heights as single units (inches, for instance) then convert the inches
   to feet/inches for display in your template.
 *  Thread Starter [bw3em](https://wordpress.org/support/users/bw3em/)
 * (@bw3em)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/sorting-numerically/#post-3571832)
 * OK, thanks x

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Sorting numerically’ is closed to new replies.

 * ![](https://ps.w.org/participants-database/assets/icon-256x256.jpg?rev=1389807)
 * [Participants Database](https://wordpress.org/plugins/participants-database/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/participants-database/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/participants-database/)
 * [Active Topics](https://wordpress.org/support/plugin/participants-database/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/participants-database/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/participants-database/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [bw3em](https://wordpress.org/support/users/bw3em/)
 * Last activity: [13 years, 2 months ago](https://wordpress.org/support/topic/sorting-numerically/#post-3571832)
 * Status: resolved