mysql how to NOT update datetime?

2010-08-24T10:24:58

I have a table where it has two datetimes, one of them is a 'completed' datetime, therefore, if it is NULL then the user has not completed.

I am trying to do an update, to update their mobile number.

How can i do it so it does not update the datetime?

currently if the datetime is null it gets set to the earliest possible time.

here is my query:

mysql_query("UPDATE action_4_members
                SET `mobile` = '{$mobile}', 
                    `additional_txt` = '{$additional}', 
                    `misc_data` = '{$store_id}' 
              WHERE `id` = '{$member_id}'") or die(mysql_error());

here is my table definition:

CREATE TABLE `action_4_members` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `campaign_id` int(11) DEFAULT NULL,
  `mobile` varchar(25) DEFAULT NULL,
  `join_txt` varchar(160) DEFAULT NULL,
  `join_txt_date` datetime DEFAULT NULL,
  `additional_txt` varchar(160) DEFAULT NULL,
  `additional_txt_date` datetime DEFAULT NULL,
  `misc_data` text,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=687 DEFAULT CHARSET=latin1

Copyright License:
Author:「Hailwood」,Reproduced under the CC 4.0 BY-SA copyright license with link to original source & disclaimer.
Link to:https://stackoverflow.com/questions/3553158/mysql-how-to-not-update-datetime

About “mysql how to NOT update datetime?” questions

I have a table where it has two datetimes, one of them is a 'completed' datetime, therefore, if it is NULL then the user has not completed. I am trying to do an update, to update their mobile numb...
We are storing datetime in a column on our MySQL database, formatted in TEXT, but when our datetime is supposed to look like below: 'xxxx-xx-xx 00:00:00' The time is deleted or not show on our
I'm trying to update my MySQL database with a DateTime variable. $interval = 'P' . $days . 'DT' . $hours. 'H' . $minutes. 'M' . $seconds . 'S' ; $date = new DateTime("NOW");&#x
How to update DATETIME column in mysql Tried using: (and many others) I do not really care how the date is formatted in the database however need to be able to update the current row with the 01/01/
How can I update only the time in an already existing DateTime field in MySQL? I want the date to stay the same.
How can I update only the time in an already existing DateTime field in MySQL? I want the date to stay the same.
I have a large table with a DATETIME column and for index reasons I want to add a column which just contains a DATE type. It seems that MySQL is not able to use an index by the following expression...
For some reason this command isn't working and can't figure out what might be wrong. I'm using mysql and this is the command: update users set regdate = '2017-06-30 15:08:24' where regdate = '0000...
I have two tables in MySQL, and each table has its own datetime field. I want to copy the datetime of table A to overwrite the datetime of table B. I use PHP. $result = mysql_query("select * ...
I am encountering the MySQL error 1064 trying to update the datetime column exit. UPDATE history SET exit = NOW() WHERE city = 'Paris' I don't understand why it occurs.

Copyright License:Reproduced under the CC 4.0 BY-SA copyright license with link to original source & disclaimer.