You are here

public function statspro::generate_term_stats in Statistics Pro 6

Same name and namespace in other branches
  1. 6.2 statspro.inc \StatsPro::generate_term_stats()

Count nodes for terms.

Return value

int

1 call to statspro::generate_term_stats()
statspro::get_aggregate_stat in ./statspro.inc

File

./statspro.inc, line 560
statspro class for statistics pro module.

Class

statspro
Manages the data saving and retrieval according to the user defined parameters.

Code

public function generate_term_stats() {

  // get nodes
  db_query('INSERT INTO {statspro_term} (tid, ncount)
        SELECT tid, COUNT(*) AS num
        FROM {term_node}
        GROUP BY tid');
  return db_affected_rows();
}