[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[linux_var] mysql touch



Salve a tutti,

ho una tabella mysql con un campo timestamp (ts) automatico:

+----------+------------------+------+-----+-------------------+-------+
| Field    | Type             | Null | Key | Default           | Extra |
+----------+------------------+------+-----+-------------------+-------+
| uid      | int(10) unsigned | NO   | MUL | NULL              |       | 
| sid      | varchar(64)      | NO   | PRI |                   |       | 
| hostname | varchar(128)     | NO   |     |                   |       | 
| ts       | timestamp        | NO   | MUL | CURRENT_TIMESTAMP |       | 


vorrei fare una query che rapidamente mi aggiornasse il campo ts al
$CURRENT_TIMESTAMP senza dover pero' alterare nessun altro campo.
In pratica come fare un `touch` della tabella. Qual'e' il metodo
ottimale?

saluti,
Francesco

-- 
Francesco De Gasperin
mail to: fdg@voo.it

Attachment: signature.asc
Description: Digital signature