<?
include("config.php");
@session_start();
session_register("ses_Pur_Pro_id");
session_register("ses_Pur_Pro_name");
session_register("ses_Pur_Pro_stro");
session_register("ses_Pur_Pro_unit");
session_register("ses_Pur_Pro_unit_wait");
session_register("ses_Pur_Pro_price");
session_register("ses_Pur_amount");
session_register("ses_Pur_total_per_unit");
session_register("ses_Pur_vat");
session_register("ses_Pur_price_vat");
session_register("ses_Pur_price_total");
session_register("ses_vat");
session_register("purchase_total");
session_register("purchase_vat");
session_register("purchase_net");
if(!session_is_registered("ses_Pur_Pro_id")){
$ses_Pur_Pro_id=array();
}
if(isset($_POST[submit])){
$sql_config="SELECT * FROM config WHERE con_id=1";
$result_config=mysql_query($sql_config);
$data_config=mysql_fetch_array($result_config);
for($i=0;$i<count($inChk);$i++){
$chk_array=in_array($inChk[$i],$ses_Pur_Pro_id);
if($chk_array==false && isset($inChk[$i])){
$sql="SELECT * FROM books WHERE book_id=$inChk[$i]";
$result=mysql_query($sql);
$data=mysql_fetch_array($result); // ตอนรันผิดตรงบรรทัดนี้ครับ
$ses_Pur_Pro_id[]=$data[book_id];
$ses_Pur_Pro_name[]=$data[book_name];
$ses_Pur_Pro_stro[]=$data[Int_num];
$ses_Pur_Pro_unit[]=$data[Point_order];
$ses_Pur_Pro_unit_wait[]=$data[Int_order];
$ses_Pur_Pro_price[]=$data[Book_price];
$ses_Pur_amount[]=1;
$ses_vat[]=$data_config[con_vat];
$ses_Pur_vat[]=$data[Pro_cost]*$data_config[con_vat];
}//¨ºif Check array
}//¨ºfor
}//¨ºif submit
echo "<meta http-equiv=refresh content=0;url=book_order.php />";
?>
ตอนรันจะขึ้นแบบนี้ครับ ช่วยให้ท่านผู้เชี่ยวชาญแก้ปัญหาให้หน่อยนะครับ
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in C:\AppServ\www\PROJECT\Order_chkbook.php on line 31
ช่วยด้วยครับ Warning: mysql_fetch_array(): supplied argument is not a valid MySQ
Moderators: mindphp, ผู้ดูแลกระดาน
- mindphp
- ผู้ดูแลระบบ MindPHP
- Posts: 26684
- Joined: 22/09/2008 6:18 pm
- Contact:
Re: ช่วยด้วยครับ Warning: mysql_fetch_array(): supplied argument is not a valid MySQ
ใช้ php เวอร์ชั่นไหนหรอครับ
ติดตาม VDO: http://www.youtube.com/c/MindphpVideoman
ติดตาม FB: https://www.facebook.com/pages/MindphpC ... 9517401606
หมวดแชร์ความรู้: https://www.mindphp.com/forums/viewforum.php?f=29
รับอบรม และพัฒนาระบบ: https://www.mindphp.com/forums/viewtopic.php?f=6&t=2042
ติดตาม FB: https://www.facebook.com/pages/MindphpC ... 9517401606
หมวดแชร์ความรู้: https://www.mindphp.com/forums/viewforum.php?f=29
รับอบรม และพัฒนาระบบ: https://www.mindphp.com/forums/viewtopic.php?f=6&t=2042
-
- Similar Topics
- Replies
- Views
- Last post
-
-
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result reso
by sutawee » 19/01/2013 9:14 pm » in Programming - PHP - 1 Replies
- 2769 Views
-
Last post by mindphp
19/01/2013 9:40 pm
-
-
-
ช่วยหน่องครับ Warning: mysql_num_rows(): supplied argument is not a valid MySQL
by knzkidz » 28/10/2014 5:35 pm » in Programming - PHP - 7 Replies
- 13188 Views
-
Last post by knzkidz
29/10/2014 8:18 am
-
-
-
มัน ERROR Warning: mysql_result(): supplied argument is not a valid MySQL result
by boyouina » 22/09/2012 10:42 am » in Programming - PHP - 0 Replies
- 10284 Views
-
Last post by boyouina
22/09/2012 10:42 am
-
-
-
mysql_num_rows(): supplied argument is not a valid MySQL result resource
by rangsun6342 » 01/03/2012 1:58 am » in Programming - PHP - 3 Replies
- 9187 Views
-
Last post by webseo2go
17/04/2012 7:21 pm
-
-
-
ตรวจ code php mysql ให้ทีครับ Warning: mysql_num_rows(): supplied argument is no
by Dwight » 09/12/2011 9:57 am » in Programming - PHP - 6 Replies
- 5300 Views
-
Last post by Dwight
12/12/2011 10:07 pm
-
Who is online
Users browsing this forum: No registered users and 14 guests