I have a timestamp column in my database, and i use it for almost every field, but now, i just want to update the hit counter.. and i do not want to update the timestamp column with it. I use the timestamp field to see the last 'content' update. Not for every hit.
Is it possible to let mysql stop updating the timest开发者_开发技巧amp column for just one query?
UPDATE mytable SET counter_field = counter_field + 1,
timestamp_field = timestamp_field
That's why I never use timestamp in my web projects. As I have full control on my queries, I can always set update time manually, without relying on the unpredictable timestamp mechanism.
精彩评论