Might be nice to add a get method similar to statistics_get, that returns the new granular counts.

Comments

jordanmagnuson’s picture

eg

function statistics_granularity_get($nid) {
  if ($nid > 0) {
    return db_query('SELECT totalcount, daycount, timestamp, weekcount, monthcount, yearcount FROM {node_counter} WHERE nid = :nid', array(':nid' => $nid), array('target' => 'slave'))->fetchAssoc();
  }
}