[PHP] mysql timestamp field
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]
Re: [PHP] mysql timestamp field
On Thu, Sep 06, 2001 at 05:09:43PM +0300, Mesut Tunga wrote: 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? The easiest way is to change the column type. Timestamp always updates itself whenever the row is updated. You could simply change the column type to datetime. -- Jason Stechschulte [EMAIL PROTECTED] -- The reason I like hitching a ride on strict vars is that it cuts down the number of rarely used pragmas people have to remember, yet provides a way to get to the point where we might, just maybe, someday, make local lexicals the default for everyone, without having useless pragmas wandering around various programs, or using up another bit in $^H. -- Larry Wall in [EMAIL PROTECTED] -- 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]
Re: [PHP] mysql timestamp field
In article [EMAIL PROTECTED], [EMAIL PROTECTED] (Jason Stechschulte) wrote: 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? The easiest way is to change the column type. Timestamp always updates itself whenever the row is updated. To be more precise: the *first* timestamp field in a table always updates itself whenever the row is updated. You could simply change the column type to datetime. Yep. Or add another timestamp column before t_stamp. But unless you have use for this auto-updating value (and it doesn't sound like you do), the first suggestion is the better one. -- CC -- 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]