运行代码时总是出现此错误
0:
Warning: mysql_fetch_assoc() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\fyp\admin_vieworders_details.php on line 12
Query Failed!You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
这是我的数据库
表 order_detail{Order_Detail_ID(PK), Order_Quantity, Sub_Total}
表订单{Order_ID, Order_Date, Order_Time, Delivery_Charge, Delivery_Name}
这是我的代码
$orderid =@$_GET["id"];
$detail = "SELECT
order.*,
order_detail.Order_Quantity,
order_detail.Sub_Total
FROM `order` AS a, `order_detail` AS b
WHERE order_detail.Order_ID = `order`.Order_ID AND order_detail.Order_Detail_ID=$orderid";
$result = mysql_query($detail);
$row = mysql_fetch_assoc($result);
if($result === FALSE)
{
die("Query Failed!".mysql_error().$result);
}