Count amout of nodeviews in a year


/ Published in: SQL
Save to your folder(s)

Counts the total amout of nodeviews between now and a year ago (the last 31536000 seconds).


Copy this code and paste it in your HTML
  1. SELECT SUM(COUNT.totalcount) FROM node_counter COUNT LEFT JOIN node n ON n.nid = COUNT.nid WHERE n.created > (UNIX_TIMESTAMP(NOW())-31536000);

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.