【发布时间】:2017-07-08 03:06:17
【问题描述】:
`
$sql = "SELECT * FROM tbl_feedback where status='Pending'";
$result = $conn->query($sql);
if ($result->num_rows > 0) {
$i=1;
// output data of each row
while($row = $result->fetch_assoc()) {
$loc=$row['location'];
$inci=$row['incident'];
$sol=$row['solution'];
echo "<tr>
<td>
<a href=editrecipient.php?feed_id=" . $row['feed_id'] . "><button type=button class='btn btn-info btn-xs' data-toggle='tooltip' data-placement='left' title='Edit'><i class='fa fa-pencil'></i></button></a>
<a href=recprofile.php?feed_id=" . $row['feed_id'] . "><button type=button class='btn btn-danger btn-xs' data-toggle='tooltip' data-placement='right' title='Delete'><i class='fa fa-trash'></i></button></a>
</td>
<td>$i</td>
<td>$loc</td>
<td>$inci</td>
<td>$sol</td>
<td><button type='button' class='btn btn-default btn-xs'>Post Feedback</button></td>
</tr>";
$i++;
}
} else {
echo "0 results";
}
$conn->close();
?>
` 这是错误消息 警告:mysqli::query(): Couldn't fetch mysqli in C:\xampp2\htdocs\Sahana\residentfeedback.php on line 222
注意:试图在第 224 行的 C:\xampp2\htdocs\Sahana\residentfeedback.php 中获取非对象的属性 0 个结果 警告:mysqli::close(): Couldn't fetch mysqli in C:\xampp2\htdocs\Sahana\residentfeedback.php on line 252
【问题讨论】:
-
哎呀,非常感谢你..