I
I
ILoveYAnny2017-07-11 09:35:52
PHP
ILoveYAnny, 2017-07-11 09:35:52

How to disable update of date(TIMESTAMP) field when UPDATE another field of this row?

Hello, I have a table that has a date TIMESTAMP field, I need to select all records in the last hour and update their status. However, when they are updated, date is updated. And at the next request, these records are already displayed as new. Can you please tell me how you can update another cell without updating date ?

UPDATE table SET status = 'false' WHERE date < NOW() - INTERVAL 1 HOUR;

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question