php-db | 2002091
Date: 09/11/02
- Next message: Russell Griechen: "[PHP-DB] PhpMyAdmin's File Manager and apps"
- Previous message: Paul DuBois: "Re: [PHP-DB] MySQL timestamp field update problem"
- Maybe in reply to: Rob Day: "[PHP-DB] MySQL timestamp field update problem"
- Next in thread: Russell Griechen: "[PHP-DB] PhpMyAdmin's File Manager and apps"
- Reply: Russell Griechen: "[PHP-DB] PhpMyAdmin's File Manager and apps"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
>From the MySQL Manual:
The TIMESTAMP column type provides a type that you can use to automatically
mark INSERT or UPDATE operations with the current date and time. If you have
multiple TIMESTAMP columns, only the first one is updated automatically.
If YOU want control over this, us the DATETIME data type:
The DATETIME type is used when you need values that contain both date and time
information. MySQL retrieves and displays DATETIME values in 'YYYY-MM-DD
HH:MM:SS' format. The supported range is '1000-01-01 00:00:00' to '9999-12-31
23:59:59'. (``Supported'' means that although earlier values might
work, there is no guarantee that they will.)
HTH
-Brad
> Hi all,
> I have a table in MySQL with the following field:
> 'time_date' timestamp(14) NOT NULL
> When a record is inserted into the table, NULL is inserted into the
> time_date field giving me a normal timestamp with the time of the INSERT.
> That much is fine.
> However, it is necessary for me to update some of the records in my table.
> But whenever I send an UPDATE, the timestamp changes. I would like for the
> timestamp value to remain unchanged. Is there a way to do this without
> reading the old value of the timestamp and reinserting with my UPDATE query?
> Thanks.
> -Rob
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
-- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
- Next message: Russell Griechen: "[PHP-DB] PhpMyAdmin's File Manager and apps"
- Previous message: Paul DuBois: "Re: [PHP-DB] MySQL timestamp field update problem"
- Maybe in reply to: Rob Day: "[PHP-DB] MySQL timestamp field update problem"
- Next in thread: Russell Griechen: "[PHP-DB] PhpMyAdmin's File Manager and apps"
- Reply: Russell Griechen: "[PHP-DB] PhpMyAdmin's File Manager and apps"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

