/ Published in: SQL
Counts the total amout of nodeviews between now and a year ago (the last 31536000 seconds).
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
SELECT SUM(COUNT.totalcount) FROM node_counter COUNT LEFT JOIN node n ON n.nid = COUNT.nid WHERE n.created > (UNIX_TIMESTAMP(NOW())-31536000);