Skip to:
Content
Pages
Categories
Search
Top
Bottom

Total Currency on website


  • Armin
    Participant

    @electron88

    Hi, I think having a total currency count would be an interesting feature to have. So it shows the amount of points out there on the site in total and the percentage in which a user has.

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

  • Tosh
    Participant

    @xberserker

    This has been in the back of my mind for a long time. I’d like to cross it off my to-do list. First step is the global community point count. Anyone have any ideas how to do that. I’ll start testing some things.


    Tosh
    Participant

    @xberserker

    Some minor progress here is the sql, mind you I don’t really know much sql so I’m probably doing it wrong.

    `$cptt_results = $wpdb->get_results(“SELECT COUNT(*) FROM “.$wpdb->usermeta.”` WHERE `meta_key` = ‘cpoints’ AND `meta_value` > 0 “);`

    when echoed I just get “array”

    If I do this:

    `$cptt_results = $wpdb->get_var(“SELECT * FROM “.$wpdb->usermeta.”` WHERE `meta_key` = ‘cpoints’ AND `meta_value` > 0 “);`

    I get nothing…. any ideas? Need to get all the point values from every member and add them all together. That’s the big first step.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Total Currency on website’ is closed to new replies.
Skip to toolbar