我如何修复mysqli_num_rows()期望参数1为mysqli_result,boolean给出 [英] How do I fix mysqli_num_rows() expects parameter 1 to be mysqli_result, boolean given in
问题描述
您好我可以帮助我试图回应我的MySQL表格中的结果
我一直收到此错误
mysqli_num_rows ()期望参数1为mysqli_result,布尔值在
代码:
< pre lang =" php"> $ uuid = $ _REQUEST [&#39; uuid&#39;]; < br $>
// mysqli_query($ link,& quot; SELECT * FROM website WHERE user =&#39; $ usr&#39;& quot;);
$ result = mysqli_query($ link,& quot; SELECT * FROM AlertPack WHERE Key =&#39; $ uuid&#39;& quot;);
if(mysqli_num_rows($ result) )& gt; 0){
//每行输出数据
while($ row = mysqli_fetch_assoc($ result))
{
echo($ row [& quot; Type& quot;]。& quot; *& quot;。$ row [& quot; Message& quot;]。& quot ; $& quot;。$ row [& quot; Time& quot;]);
}
}
?& gt;< / pre>
uuid =
_REQUEST [&# 39; uuid&#39;];
// mysqli_query(
link,& quot; SELECT * FROM website WHERE user =&#39;
Hi there can anyone help me im trying to echo the results from my MySQL table
and i keep getting this error
mysqli_num_rows() expects parameter 1 to be mysqli_result, boolean given in
Code:
<pre lang="php">$uuid = $_REQUEST['uuid'];
//mysqli_query($link, "SELECT * FROM website WHERE user = '$usr'");
$result = mysqli_query($link, "SELECT * FROM AlertPack WHERE Key = '$uuid'");
if (mysqli_num_rows($result) > 0) {
// output data of each row
while($row = mysqli_fetch_assoc($result))
{
echo($row["Type"] . "*" . $row["Message"] . "$" . $row["Time"]);
}
}
?></pre>
uuid =
_REQUEST['uuid'];
//mysqli_query(
link, "SELECT * FROM website WHERE user = '
这篇关于我如何修复mysqli_num_rows()期望参数1为mysqli_result,boolean给出的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!