MySQL update timestamp without changing data

software development

#1

Hi,

I can’t figure out why this doesn’t work. I have a table with a column with the attribute on update current_timestamp. All I want to do is update that timestamp, I don’t want to change anything else in the table. So shouldn’t "UPDATE table_name WHERE " work even though I don’t have any SET clause? This is the query I am running, but it does not update the timestamp. And mysql_error() is not outputting anything. So I am not sure what is going wrong here.


#2

Ok, apparently I can run an update query that says SET time = current_timestamp and that will do it. Although I think that update with no set clause still should have worked. But w/e I’ve been sitting on my ass so long I don’t even care why things work anymore, just as long as they do.