PHP和MySQL总是为列插入0

时间:2017-03-21 01:10:12

标签: php mysql

每次我在数据库的第二列中插入一些东西(uname)时,它最终都是0.我调试了它,它在php中有正确的文本。即使我硬编码像" joe"它仍然在MySQL中插入0。该列是varchar(16)。我也尝试过键入Text。这是代码:

<a href="/root/<Your Directory Index>.php">Link</a>

1 个答案:

答案 0 :(得分:1)

将绑定参数从int(s)更改为字符串(mysqli_stmt_bind_param($statement, "ssis", $name, $enteredUsername, $age, $password); ):

{{1}}
相关问题