[eluser]WanWizard[/eluser]
If you use CURRENT_TIMESTAMP for the datetime field, combined with "on update CURRENT_TIMESTAMP", you don't have to worry updating that, MySQL will take care of that.
As for the rest, I'm not sure what you exactly want. You have a record per click, and you want a total per user_id per day?
The query could then be something like:
Code:
SELECT user_id, COUNT(*) AS clicks, DATE(datatime) AS day
FROM TABLENAME
WHERE datatime >= '2009-01-01 00:00:00'
AND datatime < '2010-01-01 00:00:00'
GROUP BY user_id
which gives you clicks per user for the selected time period.