荫收到此错误为什么iam在error_log文件中得到与bind_result相关的错误以及如何解决?
[07月 - 2017年11点48分47秒UTC] PHP的警告:mysqli_stmt :: bind_result(): 绑定变量的数量不匹配字段数准备 声明
$stmt = $con->prepare("SELECT * FROM table where Id =?");
$stmt->bind_param("s", $_POST['Id']);
$stmt->execute();
$result = $stmt-> bind_result($Id);
$numRows = $result->num_rows;
if($numRows > 0) {
if($row = $result->fetch_assoc())
{
$Taxname=$row['TaxName'];
$Tid=$row['Id'];
}}
您在'$ Id'中获得的价值是多少? – Gunaseelan
@Gunaseelan sir .i只需要知道bind_result中的变量应该是什么?数值来自数据库吗? – krish
你在表名'table'中得到了多少列和什么是列值? – Gunaseelan