I\'ve faced a little trouble while i\'m working with PHP:$now = date(\'Y-m-d H:i:s\', time()); and MySQL: UPDATE users SET user_lastactivity=NOW()
$now = date(\'Y-m-d H:i:s\', time());
UPDATE users SET user_lastactivity=NOW()
Why don't you use the php var $now in your request to be sure to have the same referential?
UPDATE users SET user_lastactivity = $now