Skip to:
Content
Pages
Categories
Search
Top
Bottom

How to mysql query `$wpdb->get_var` `bp_groups` in buddypress?

  • Avatar of youlichika
    youlichika
    Member

    @youlichika

    I know that `$wpdb->get_var(“SELECT COUNT(*) FROM $wpdb->users;”);` can select wordpress user by mysql, but when I call a buddypress group, it failed, nothing return `$wpdb->get_var(“SELECT COUNT(*) FROM $wpdb->bp_groups;”);` Is there anyone know how to?

Viewing 1 replies (of 1 total)
  • Avatar of juan_stephano
    juan_stephano
    Member

    @juan_stephano

    you’ve probably figured this out by now but if not (and for any other readers) you need $count = $wpdb->get_var(“SELECT COUNT(*) FROM $bp->groups->table_name”); I think.

Viewing 1 replies (of 1 total)

You must be logged in to reply to this topic.