ติดบัคอะครับ Warning: mysqli_num_rows() expects parameter 1 to be mysqli_result, boolean given in /Applications/XAMPP/xamppfiles/htdocs/wincycle/serch.php on line 76 ช่วยแนะนำที
Code (PHP)
$where=''; $num=0; $row=0;
if (isset($_GET['fname'])!=""){
$where=' where product.pro_name like "%'.s($con,$_GET['fname']).'%"
OR product.size like "%'.s($con,$_GET['fname']).'%"
OR product.speed like "%'.s($con,$_GET['fname']).'%"
OR category.name_cat like "%'.s($con,$_GET['fname']).'%"';
$send_url.='&fname='.s($con,$_GET['fname']);}
$query = sprintf('select * from product inner join category on product.id_cat = category.id_cat order by product.pro_no desc ',$where);
$result = mysqli_query($con,$query);
$total = mysqli_num_rows($result);
$totalpage = ceil($total/$each);
$goto = ($page-1) * $each;
$query = sprintf('select * from inner join category on product.id_cat = category.id_cat order by product.pro_no desc limit %s,%s',$where,$goto,$each);
$result = mysqli_query($con,$query);
บัคบันทัดนี้ครับ >>> if (mysqli_num_rows($result)>0) { $row=mysqli_num_rows($result);
} else { msgbox('กรุณาค้นหาตามชื่อรถจักรยาน/หรือขนาดรถจักรยาน ','javascript:history.back()'); }