运行准备好的语句以更新表行时,我收到“HY000 一般错误”。查询似乎正在运行,并且该行已成功更新。我的代码和返回的错误详述如下。如果有人能指出我解决这个问题的正确方向,我将不胜感激。
代码示例:
$query = 'UPDATE users SET active = 1 WHERE email = ? AND activationCode = ?';
$stmt = $this->ds->prepare($query);
$stmt->bindValue(1, $email);
$stmt->bindValue(2, $code);
$stmt->execute();
$row = $stmt->fetch();
错误详情:
File: C:\apache2\htdocs\ppi-framework\Vendor\Doctrine\Doctrine\DBAL\Statement.php
Line: 189
Message: SQLSTATE[HY000]: General error
Code: HY000