Php 检查结果有误

Php 检查结果有误,php,database,mysqli,pdo,statements,Php,Database,Mysqli,Pdo,Statements,我有以下代码: $PDOStatement=$pdo->prepare(“插入用户(ID、电子邮件、密码)值(?,,?)”; 如果($PDOStatement->execute($uuid,$email,$encrypted_password)) { 回声“测试”; 返回true; }您需要将参数作为数组传递: if($PDOStatement->execute($uuid, $email,$encrypted_password)) 应该是 if($PDOStatement->e

我有以下代码:

$PDOStatement=$pdo->prepare(“插入用户(ID、电子邮件、密码)值(?,,?)”;
如果($PDOStatement->execute($uuid,$email,$encrypted_password))
{
回声“测试”;
返回true;

}
您需要将参数作为数组传递:

if($PDOStatement->execute($uuid, $email,$encrypted_password))
应该是

if($PDOStatement->execute([$uuid, $email,$encrypted_password]))

(手动:)

您需要将参数作为数组传递:

if($PDOStatement->execute($uuid, $email,$encrypted_password))
应该是

if($PDOStatement->execute([$uuid, $email,$encrypted_password]))

(手动:)

删除返回为什么标记为mysqli?@FunkFortyNiner嗨,谢谢你的快速回答:)我在之前不工作的情况下附加了返回,而且,我对MySQL非常陌生,基本上是从本周开始的,在一个页面上我看到了mysqli,另一个页面上说只有MySQL,所以我不清楚。在你的IF之外,请尝试
print\r($PDOStatement->errorInfo());
这是什么输出?删除返回为什么标记为mysqli?@FunkFortyNiner嗨,谢谢你的快速回答:)我在返回之前不起作用后附加了返回,我对MySQL非常陌生,基本上是从本周开始的,在一个页面上我看到了mysqli,另一个页面上说只有MySQL,所以我不清楚。在IF之外,尝试
print\r($PDOStatement->errorInfo())输出什么?