警告:mysqli_num_rows()期望参数1为mysqli_result,布尔值为 [英] Warning: mysqli_num_rows() expects parameter 1 to be mysqli_result, boolean given in
问题描述
<?php
包含'openCon.php';
$ sql =SELECT id,price,table,unitTable,chair,unitChair,lightingFan,unitLightingFan,Decoration,unitDecoration FROM packagea;
$ result = mysqli_query($ conn,$ sql);
if(mysqli_num_rows($ result)> 0){
while($ row = mysqli_fetch_assoc($结果))
{
$ id = $ row ['id'];
$ price = $ row ['price'];
$ table = $ row ['table'];
$ unitTable = $ row ['unitTable'];
$ chair = $ row ['chair'];
$ unitChair = $ row ['unitChair'];
$ lightingFan = $ row ['lightingFan'];
$ unitLightingFan = $ row ['unitLightingFan'];
$ Decoration = $ row ['Decoration'];
$ unitDecoration = $ row ['unitDecoration' ];
echo;
echo;
echo;
echo;
echo;
echo;
echo;
echo;
echo;
echo;
}
< br $> b $ b
}
?>
Bil | 价格 | 表 | 单位 | 主席 | 单位 | 照明&风扇 | 单元 | 装饰 | 单元 |
---|---|---|---|---|---|---|---|---|---|
$ id | $ price | $表 | $ unitTable | $椅 | $ unitChair | $ lightingFan | < td> $ unitLightingFan$ Decoration | $ unitDecoration |
- >我在这条线上遇到问题= if(mysqli_num_rows($ result)> 0){
我尝试过:
我已经尝试了解决方案的问题,但我尝试一切都没有修复我的错误
sql =SELECT id,price,table,unitTable,chair,unitChair,lightingFan,unitLightingFan,Decoration,unitDecoration FROM packagea;
result = mysqli_query(
连接,
<?php
include 'openCon.php' ;
$sql = "SELECT id,price,table,unitTable,chair,unitChair,lightingFan,unitLightingFan,Decoration, unitDecoration FROM packagea";
$result = mysqli_query($conn,$sql) ;
if(mysqli_num_rows($result) > 0) {
while($row = mysqli_fetch_assoc($result))
{
$id = $row['id'];
$price = $row['price'];
$table = $row['table'];
$unitTable = $row['unitTable'];
$chair = $row['chair'];
$unitChair = $row['unitChair'];
$lightingFan = $row['lightingFan'];
$unitLightingFan = $row['unitLightingFan'];
$Decoration = $row['Decoration'];
$unitDecoration = $row['unitDecoration'];
echo "";
echo "";
echo "";
echo "";
echo "";
echo "";
echo "";
echo "";
echo "";
echo "";
}
}
?>
Bil | Price | Table | Unit | Chair | Unit | Lighting & Fan | Unit | Decoration | Unit |
---|---|---|---|---|---|---|---|---|---|
$id | $price | $table | $unitTable | $Chair | $unitChair | $lightingFan | $unitLightingFan | $Decoration | $unitDecoration |
->I HAVE PROBLEM AT THIS LINE = if(mysqli_num_rows($result) > 0) {
What I have tried:
I HAVE TRY GOOGLE FOR THE SOLUTION BUT EVERYTHING I TRY IT DOESNT FIX MY ERROR
sql = "SELECT id,price,table,unitTable,chair,unitChair,lightingFan,unitLightingFan,Decoration, unitDecoration FROM packagea";
result = mysqli_query(
conn,
这篇关于警告:mysqli_num_rows()期望参数1为mysqli_result,布尔值为的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!