この機能では、次のエラーが発生します。基本的なphp関数で構文エラーが発生しました。
Parse error: syntax error, unexpected '$tempsql' (T_VARIABLE) in /home/vps20119/public_html/outlet/admin/internal/dcOrderFunctions.php on line 6
私はそれを取得しません。私は、$ tempsqlの定義/宣言を始める前に、構文エラーを見つけることができません。私は何を見ていますか?以下はファイル全体のコピーです。
<?php
//A function to extract the QC from the Order number
function orderGetQC($dropcomOrderID){
//Get the Product ID from the order.
$tempsql = "SELECT * FROM `oc_order_product` WHERE `order_id` = '". $dropcomOrderID ."'";
//runs the query (above) and puts the resulting data into a variable called $orderInfo.
$orderInfo = $conn->query($tempsql);
$temprow = $orderInfo->fetch_assoc();
$productID = $temprow['product_id'];
//Get the QC from the product ID.
$tempsql2 = "SELECT * FROM `multi_quantity_received` WHERE `product_id` = '". $productID ."'";
//runs the query (above) and puts the resulting data into a variable called $productInfo.
$productInfo = $conn->query($tempsql2);
$temprow2 = $productInfo->fetch_assoc();
if($productInfo->num_rows > 1){
$QC = "multipleQCs";
} else {
$QC = $temprow2['qc'];
}
return $QC;
}
?>
上記のコード –
には、構文エラー、あなたのコードには、構文エラーが彼らではありませんが、あなたが右のコードを掲載しますが、確かに、ありません? –
その行の前のコメントを削除してみてください。これは、ロングショットが、あなたは($ dropcomOrderID)orderGetQCを呼び出すとき – Machavity