 |
ผมใช้ INNER JOIN แล้วข้อมูลไม่ออกมาครับ ขอความช่วยเหลือด้วยครับ |
|
 |
|
|
 |
 |
|
ติดบัคอะครับ 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()'); }
Tag : PHP
|
ประวัติการแก้ไข 2016-09-30 15:30:17 2016-09-30 15:31:44 2016-09-30 15:32:57 2016-09-30 15:33:34 2016-09-30 15:34:02 2016-10-03 09:59:06 2016-10-03 10:00:42
|
 |
 |
 |
 |
Date :
2016-09-30 15:29:20 |
By :
DisconnectOver |
View :
903 |
Reply :
7 |
|
 |
 |
 |
 |
|
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ครับผม
|
 |
 |
 |
 |
Date :
2016-10-04 14:16:36 |
By :
DisconnectOver |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ตัวแปร query %s ขาดไปตัวนึงรึป่าวคับ
|
 |
 |
 |
 |
Date :
2016-10-05 06:48:52 |
By :
Luz |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ตัวแปร query %s ขาดไปตัวนึงรึป่าวคับ
ตรงไหนหรอครับผม
|
 |
 |
 |
 |
Date :
2016-10-05 08:40:57 |
By :
DisconnectOver |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
Luz ขอบคุณครับผม เรียบร้อยแล้วครับสุดยอดๆๆ
|
 |
 |
 |
 |
Date :
2016-10-05 09:17:08 |
By :
DisconnectOver |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|

|
 |
 |
 |
 |
Date :
2016-10-05 10:14:47 |
By :
mr.win |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
|
|