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.

Ordering by custom field, different set of results when sorting "asc" vs "desc" or no sort set.

October 11, 2011 10:01pm

Subscribe [2]
  • #1 / Oct 11, 2011 10:01pm

    dstechroom

    113 posts

    Hello -

    When ordering by a custom field (orderby=“manufacturer”), which contains a three-letter code, we get not different sorting, but a whole different set of results.

    This is pull from a channel of about 200 entries.

    Any idea what might be going on?

    {exp:channel:entries channel="channel_name" category="{embed:category}" disable="pagination|member_data"}
    {title}
    {/exp:channel:entries}
    
    or
    
    {exp:channel:entries channel="channel_name" category="{embed:category}" disable="pagination|member_data" orderby="manufacturer" }
    {title}
    {/exp:channel:entries}
    
    Yields different results from:
    
    {exp:channel:entries channel="channel_name" category="{embed:category}" disable="pagination|member_data" orderby="manufacturer" sort="asc"}
    {title}
    {/exp:channel:entries}

    Sort not defined or sort=“desc” yields the same results. sort=“asc” yields some entries that do not show up otherwise.

  • #2 / Oct 11, 2011 10:03pm

    dstechroom

    113 posts

    There’s no limit set, so I don’t believe it would be from simply grabbing the wrong end of the spectrum of entries? It does use playa to grab related entries.

  • #3 / Oct 12, 2011 7:10am

    Sue Crocker

    26054 posts

    Hi, dstchroom.

    Unless you specify otherwise, limit is hard coded to 100. So I would expect to see differences between the two since you have over 100 entries. Try adding limit=“200” to see if that changes things.

    Does that help?

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

ExpressionEngine News!

#eecms, #events, #releases