/ Published in: MySQL
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
insert into sitestats_rollup(hitdatetime,hitid,hitcount) select date_format(hitDate, "%Y-%m-%d %h:00:00"), hitKey, count(*) from sitestats group by 1,2 on duplicate key update hitcount=hitcount+1;