Q:

how not to update timestamp field

project is written on php.
There is timestamp field in mysql it updates automatically. In one case I don`t need update this field. Can I gibe instruction not to update this field in this queries without getting timestamp value.

A:

You should change it to DEFAULT CURRENT_TIMESTAMP otherwise it will auto-update. From the manual:

In a CREATE TABLE  statement, the first TIMESTAMP column can be declared in any of the following ways:
With both DEFAULT CURRENT_TIMESTAMP and ON UPDATE CURRENT_TIMESTAMP clauses, the column has the current timestamp for its default value, and is automatically updated.
With neither DEFAULT nor ON UPDATE clauses, it is the same as DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP.
With a DEFAULT CURRENT_TIMESTAMP  clause and no ON UPDATE clause, the column has the current timestamp for its default value but is not automatically updated.

