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.

total Count of entries with certain status published by a user?

September 15, 2007 11:01pm

Subscribe [1]
  • #1 / Sep 15, 2007 11:01pm

    latrine

    28 posts

    I want EE to output a total number of entries that have a certain status and been published by the current user…

    I have tried to use:

    {exp:weblog:entries weblog="encomendas" status="submetida para cotacao" username="CURRENT_USER" }{count}{/exp:weblog:entries}

    wich produced something like:
    1234567n the count for each entry….

    but I want it to produce something like:
    n

    I also tried:

    {exp:weblog:entries weblog="encomendas" status="submetida para cotacao" username="CURRENT_USER" }{total_results}{/exp:weblog:entries}

    wich produced something like:

    77777777777 - one total result for each entry….


    I have also tried to use the query tag like:

    {exp:query sql="SELECT COUNT(*) AS total_results FROM exp_weblog_title WHERE status='submetida para cotacao' AND ????????????????"} {total_results} {/exp:query}

    But I am lacking the code to “only count entries by current user”...
    Is there a EE variable that I overlooked?
    Can Anyone help on the ??????????????

    TIAdvance
    JPCarvalhinho

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

ExpressionEngine News!

#eecms, #events, #releases