Just a quick question, i have a table called node_counter in my database, only it is empty. What is it used for and how would i go about using it in a Module?

Comments

nancydru’s picture

Try enabling the statistics module (core). It shows how many times a node has been viewed, and you can set that to display automatically.

Nancy W.
Drupal Cookbook (for New Drupallers)
Adding Hidden Design or How To notes in your database

nexus7’s picture

With Drupal 5.1 I have done this and node_counter doesn't update with a new node that's why nodes never had a value to show is this an error or only my misconfiguration problem???

nancydru’s picture

My database that I used statistics on has values in there. Are you sure you have the statistics module turned on? Do you see a "Recent Hits" entry under Admin >> Logs?

Nancy W.
Drupal Cookbook (for New Drupallers)
Adding Hidden Design or How To notes in your database

nexus7’s picture

This was a misconfiguration, sorry :)

Wutimer’s picture

What was the misconfiguration? We're having the same issue in a Drupal 6.2 version.

node_counter is empty.

e302us’s picture

go to /admin/logs/settings, enable counter

jaredeckersley’s picture

At what point does an entry get inserted into node_counter?

We have setup 2 mysql accounts: 1 for inserting nodes and node revisions, and the other for the public facing web server. It appears that entries are being made in the node_counter table the first time nodes are visited. While this is ok, I would like to restrict the public facing account to updates only. Is this a configuration setting?

kevinquillen’s picture

This also is not working for me. I can't find any setting for it other than Enable Counter.

===========
read my thoughts

aborg’s picture

go to
admin/reports/settings
and turn on counter checkboxes

bagusbean’s picture

I went to my /admin/logs/settings and enabled both node and access logs and it seems to be working.

There's a link to /admin/logs that has lots of stuff, but nothing that I see is purely "Nodes".

THere's /admin/logs/pages that seems to report on all url's hit. I really just want Forum statisitics.

I looked in my node_counter table and it actually seems to only be recording hits to nodes.

Where is the front end for looking at what's in there?

Thanks,

Bagus

ccshannon’s picture

FYI readers, If you try to browse to admin/logs/settings you'll get a 404.

It's admin/reports/settings

It can also be found by navigating to Administer >>> Reports >>> Access log settings

nancydru’s picture

It's "logs" in Drupal 5 and "reports" in Drupal 6.