The timestamp data type is a special MySQL type that automatically updates
whenever you add or update a row in a table.

If you want timestamp to work when you add a row but not when you update a
row, you need to write your update statements like this:

UPDATE tbl_name SET vartochange="newvalue", t_stamp=t_stamp WHERE ...

The "t_stamp=t_stamp" will cause t_stamp to not change to now().

Doug Granzow
[EMAIL PROTECTED]



"Mesut Tunga" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi all,
>
> I need an update on my table. but I have a timestamp field called
> t_stamp. When I update a field other than t_stamp field, t_stamp field
> also updates to now(). I need it not to update and saves its value.
>
> How should I do this?
>
> Regards
> Mesut Tunga...
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to