`$sql = "INSERT into file (filename, filepath, lastmodified, ago, timestamp, User) VALUES ('$x','$legend', '$time', '$ago', '$timestamp', '$user')`
ON DUPLICATE KEY UPDATE lastmodified = '$time', ago = '$ago', User = IF(lastmodified > NOW() - INTERVAL 10 MINUTES, '$user', User)";
$result = $conn->query($sql);
声明的最后部分" User = IF声明"我似乎无法做出正确的决定。我基本上只是希望更新用户列,如果最后修改的列已更新。