Victoria Reznichenko wrote: > recu> small problem. I have a table set up like so. It has a number of entries > recu> that were added on a certain date, I use TIMESTAMP to keep track of the date. > > recu> mysql> UPDATE deerfield SET version = '2.1' WHERE product = 'WinGate LITE'; > > recu> and all of the dates of the filed that match the where clause updated to > recu> today's date. How can I avoid this? Is there a problem with the set-up of > recu> the timestamp itself. > > It is a particular feature of timestamp type. > You should use another type of data. > You can read info about date, time and timestamp types at: > http://www.mysql.com/doc/D/A/DATETIME.html
MySQL only does this to the first TIMESTAMP column in a table, so the usual other solution is to have a "last_modified" column in the table right at the head (before any other timestamps). This gives you two benefits: an automatic timestamping of the modifications, and you can use the TIMESTAMP type safely for other timestamp values. --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php