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.

Order by view count act strange

February 23, 2009 10:41am

Subscribe [2]
  • #1 / Feb 23, 2009 10:41am

    Ole Jensen

    9 posts

    When I try to generate a list of most viewed entries, they are sorted in a strange way. I use this code:

    {exp:weblog:entries weblog="eu_fagligt|temaer" orderby="view_count_one" rdf="off" dynamic="off"  limit="10" disable="trackbacks|comments|categories|member_data|custom_fields_pagination" }
    <a href="http://{title_permalink=index}">{title}</a> {view_count_one}
    
    {/exp:weblog:entries}

    And got a sort order like this:

    xxx 109
    xxx 90
    xxx 65
    xxx 55
    xxx 48
    xxx 6
    xxx 856
    xxx 449
    xxx 439
    xxx 438

    Any suggestions?

    Kind regards
    Ole

  • #2 / Feb 23, 2009 10:51am

    Mark Bowen

    12637 posts

    Are the last four entries by any chance fromt the temaer weblog?

    I’ve never done this sort of thing on more than weblog at a time so I am guessing (if those last four entries are from the second weblog) that perhaps it is also sorting them via weblog too?

    If that is indeed the case and the in-built sorting options can’t fix it then you may be looking at a SQL query to get at what you need.

    Best wishes,

    Mark

  • #3 / Feb 23, 2009 11:34am

    Ole Jensen

    9 posts

    Thanks Mark
    I just tried to remove the second weblog from the code, but it makes no different. The problem is still the same! Ohh stupid thing, some of the entries was marked as sticky - sorry.

    😊 Ole

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

ExpressionEngine News!

#eecms, #events, #releases