rob,
Wednesday, March 06, 2002, 2:19:01 PM, you 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> +---------------------+---------------+------+-----+---------+--------------
recu> --+
recu> | Field | Type | Null | Key | Default | Extra
recu> |
recu> +---------------------+---------------+------+-----+---------+--------------
recu> --+
recu> | auto | mediumint(10) | | PRI | NULL |
recu> auto_increment |
recu> | accref | varchar(6) | YES | | NULL |
recu> |
recu> | orderdate | timestamp(8) | YES | | NULL |
recu> |
recu> | version | varchar(9) | YES | | NULL |
recu> |
recu> | upgradep | varchar(4) | YES | | NULL |
recu> |
recu> | status | varchar(8) | YES | | NULL |
recu> |
recu> | status_relate_to_id | int(11) | YES | | NULL |
recu> |
recu> +---------------------+---------------+------+-----+---------+--------------
recu> --+
recu> Unfortunately, I used this query on the table
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
recu> Rob
--
For technical support contracts, goto https://order.mysql.com/
This email is sponsored by Ensita.net http://www.ensita.net/
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / Victoria Reznichenko
/ /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED]
/_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net
<___/ www.mysql.com
---------------------------------------------------------------------
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