Jump to content

[SOLVED] timestamp updates by itself?


JP128

Recommended Posts

$password = $_POST['password'];
mysql_query("UPDATE users SET password=md5('$password') WHERE username='$username'");
}
$firstname = $_POST['firstname'];
$lastname = $_POST['lastname'];
$email = $_POST['email'];
$biography = $_POST['biography'];
$location = $_POST['location'];
mysql_query("UPDATE users SET firstname='$firstname' WHERE username='$username'");
mysql_query("UPDATE users SET lastname='$lastname' WHERE username='$username'");
mysql_query("UPDATE users SET email='$email' WHERE username='$username'");
mysql_query("UPDATE users SET biography='$biography' WHERE username='$username'");
mysql_query("UPDATE users SET location='$location' WHERE username='$username'");
}
I just had a look at MySQL reference and you can set the column in your database table to update with the current time stamp when the record is updated, you must have done this! You will need to amend the relevent column:

ALTER TABLE tablename MODIFY columnname DATETIME

Above is the syntax to change the data type of your relevant column to a datetime value without any additional auto update settings.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.