I need to update 2 datetime columns, and I need them to be exactly the same, using mysql version 4.1.20. I'm using this query:
mysql> update table set last_update=now(), last_monitor=now() where id=1;
It is safe or there is a chance that the columns are update with different time, beacause of the 2 visible calls to now() ?
I don't think that it can be update with different values (I think internaly mysql calls now() just once per row or something similar) , but I'm not an expert, what do you think ?
Second question why this query doesn't update the columns:
mysql> update table set last_update=last_monitor=now() where id=1;
Query OK, 0 rows affected (0.00 sec)
Rows matched: 1 Changed: 0 Warnings: 0
Thank you.