我有一个查询得到这些变量(但来自 POST 表单):
$username = "John";
$email = "johnsmith@mail.com";
$passwordEnc = "9d4e1e23bd5b727046a9e3b4b7db57bd8d6ee684";
$activated = 0;
$activationKey = "5753a498f025464d72e088a9d5d6e872592d5f91";
查询如下:
$stmt = $dbu->prepare("INSERT INTO users (username, email, password, activated, key) VALUES (?, ?, ?, ?, ?)");
$stmt->execute(array($username, $email, $passwordEnc, $activated, $activationKey));
没有错误,但该条目未添加到名为“用户”的表中。