我正在使用以下代码来节省时间。我尝试将列类型更新为 DATETIME 和 TIMESTAMP
$statement = $conn->prepare('UPDATE users SET update = :update WHERE id = :clientId');
$statement->bindParam(':clientId', $clientId, PDO::PARAM_STR);
$statement->bindParam(':update', time(), PDO::PARAM_STR);
$statement->execute();
{"error":"SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'update = '1367692928' WHERE id = 'I9pm90r-b4'' at line 1"}