【发布时间】:2018-08-02 00:40:45
【问题描述】:
我有这个代码:
$PDOStatement = $pdo->prepare("INSERT INTO users (ID, email, password) VALUES(?, ?, ?)");
if($PDOStatement->execute($uuid, $email,$encrypted_password))
{
echo "test";
return true;
}
数据被输入到数据库中,但不幸的是 IF 没有给出回显或返回。
提前致谢!
【问题讨论】:
-
去掉退货
-
为什么这个标签是mysqli?
-
@FunkFortyNiner 嗨,感谢您的快速回答:) 我在之前没有工作后附上了退货
-
而且,好吧,我对 MySQL 很陌生,基本上是从本周开始的,在一个页面上我看到了 MySQLi,另一个说只有 MySQL,所以我不清楚。
-
在你的 IF 之外,试试
print_r($PDOStatement->errorInfo());那会输出什么?
标签: php database mysqli pdo statements