我想获取数据三个表“类别,子类别,产品”但我必须得到一些错误
警告:mysqli_fetch_array() 期望参数 1 为 mysqli_result,布尔值在 D:\xammp\htdocs\tam\admin\edit-products.php 第 157 行中给出
PHP SQL
<?php
$query=mysqli_query($conn,"select * from products.*,
category.categoryName as catname,
subcategory.subcategory as categoryName
from products join category on
category.cid=products.cid
join subcategory on subcategory.sid=products.sid
where products.id='$id'");
while($row=mysqli_fetch_array($query))// line 157
{ ?>
}?>