I am trying to create an expiration date for member's accounts. I want to add 1 year to todays date.
I tried using MySQL's date_add function directly in the Update statement, but the query did not work.
qUpdateUserStatus = mysql_query ("UPDATE tblUsers
SET password = PASSWORD('$newpass'),
ActivationKey = '$key',
ActivationDate = NOW(),
fk_StatusID = '$status',
ExpirationDate = date_add(NOW(), INTERVAL 1 Year)
WHERE ID = '$UserID'");
If I remove the line
ExpirationDate = date_add(NOW(), INTERVAL 1 Year)
the update works without a hitch.
Any ideas?