|
 |
|
สอบถามการ Query ข้อมูลจากฐานข้อมูลให้แสดงในหน้าเว็บ |
|
 |
|
|
 |
 |
|
สอบถามการ Query ข้อมูลจากฐานข้อมูลให้แสดงในหน้าเว็บ มัน error ตรงที่ $Rec->Open($str, $conn, 1, 3);
Code (PHP)
<?php
$str = "SELECT tb_Center.CenterNo, tb_Function.Function_Name, tb_Contract.Contract_No,tb_Equipment_Type.Equipment_Type, tb_Purchase.Budget_New,
tb_Purchase.Budget_Replace, tb_Equipment.Budget_Price
FROM (tb_Function INNER JOIN (tb_Center_Function INNER JOIN tb_Center ON tb_Center_Function.ID_Center = tb_Center.ID_Center)
ON tb_Function.ID_Function = tb_Center_Function.ID_Function)
INNER JOIN ((tb_Equipment_Type INNER JOIN (tb_Contract INNER JOIN tb_Equipment ON tb_Contract.ID_Contract = tb_Equipment.ID_Contract)
ON tb_Equipment_Type.ID_Equipment_Type = tb_Equipment.ID_Equipment_Type) INNER JOIN tb_Purchase ON tb_Equipment.ID_Equipment = tb_Purchase.ID_Equipment)
ON tb_Function.ID_Function = tb_Purchase.ID_Function
where tb_Contract.ID_Contract =".$_GET['Contract_No']."
and tb_Equiptment_Type.ID_Equiptment_Type =".$_GET['Equiptment_Type']."";
$Rec->Open($str, $conn, 1, 3); // error ตรงนี้ค่ะ
while (!$Rec->EOF)
{
$CenterNo= $Rec->Fields['CenterNo']->Value;
$Contract_No= $Rec->Fields['Contract_No']->Value;
$Functionname= $Rec->Fields['Function_Name']->Value;
$Equipment_Type= $Rec->Fields['Equipment_Type']->Value;
$Budget_New = $Rec->Fields['Budget_New']->Value;
$Budget_Replace= $Rec->Fields['Budget_Replace']->Value;
$Budget_Price= $Rec->Fields['Budget_Price']->Value;
$RentMonth = $Budget_Price*($Budget_New+$Budget_Replace);
$RentYear = $RentMonth*12;
$RentYear3 = $RentYear*3;
?>
รบกวนผู้รู้ตอบด้วยน่ะค่ะ ขอบคุณค่ะ
Tag : PHP, Ms Access, Ajax, jQuery, Report Others

|
|
 |
 |
 |
 |
Date :
2012-08-31 09:35:11 |
By :
mah_comsci |
View :
904 |
Reply :
2 |
|
 |
 |
 |
 |
|
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
เอาตัวแปรมารับต่ออีกทีครับ
|
 |
 |
 |
 |
Date :
2012-08-31 10:06:09 |
By :
Dragons_first |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
เอาตัวแปรมารับต่อยังงัยค่ะ รบกวนอธิบายด้วยน่ะค่ะ ขอบคุณค่ะ
|
 |
 |
 |
 |
Date :
2012-08-31 10:09:13 |
By :
mah_comsci |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
|
|
|

|
Load balance : Server 04
|