ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Question about orderby and sort

July 29, 2010 4:07pm

Subscribe [2]
  • #1 / Jul 29, 2010 4:07pm

    Oscar Sanchez

    27 posts

    Hello,

    I have a weblog with a field called Order, in there i order all my entries with number.

    For Example:

    John Lennon 1
    Paul McCartney 2
    Gorge Harrison 3
    Ringo Star 4
    Elvis Presley 5

    So, in this way i set my weblog to orderby=“order” sort=“asc” to appear as the list.

    But what happened when i pass number 9 the list is:

    John Lennon 1
    Mick Jagger 10
    Kurt Cobain 11
    Paul McCartney 2
    Gorge Harrison 3
    Ringo Star 4
    Elvis Presley 5

    I understand what happened is that EE call all the 1 at first but is there any way to set up to bring in order this numbers?

  • #2 / Jul 29, 2010 4:11pm

    Ingmar

    29245 posts

    The simples way is to use 01, 02, 03 ... 09, 10, 11 etc.

  • #3 / Jul 29, 2010 4:16pm

    Oscar Sanchez

    27 posts

    Thank you Ingmar, will edit it..

  • #4 / Jul 29, 2010 4:17pm

    Ingmar

    29245 posts

    Cool. This is not an EE issue as such, it’s got to do with database collation. Any other solution would require modifying the db directly, and we don’t recommend (or support) that if it can be helped 😊 Please post again as needed.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases