EOF) { $gSQL="select MinOrd, Product_Site_Classify_SN from Product where Product_SN=$Product_SN"; $gRS = new Recordset($gSQL); $gQ=$gRS->f("MinOrd"); if($gQ>0){ $ggQ=$gQ; } else{ $ggQ=1; } $Temp_Storage_SN = GetSN("Temp_Storage"); $PSCSN=$gRS->f("Product_Site_Classify_SN"); $SQL3 = "INSERT INTO Temp_Storage (Temp_Storage_SN, Company_SN, Product_SN, Product_NO, PHPSESSID, Quantity, Comment, Product_Site_Classify_SN,Inquiry_Template) "; $SQL3.= " VALUES ('$Temp_Storage_SN','$Company_SN','$Product_SN','" . $part_no[$i] . "','$PHPSESSID','$ggQ','$Comment','$PSCSN','$Inquiry_Template')" ; } else { $Quantity = $RS1->Field("Quantity") + 1; $Product_SN1 = $Product_SN[$i]; $SQL3 = "Update Temp_Storage set Quantity = '$Quantity', Inquiry_Template = '$Inquiry_Template' WHERE Temp_Storage_SN =" . $RS1->Field("Temp_Storage_SN"); } ExecuteSQL($SQL3); } } elseif (count($Product_NO) != 0 and $tdc_PP=="Yes") { $gSQL="select MinOrd, Product_Site_Classify_SN from Product where Product_SN=".$Product_SN; $gRS = new Recordset($gSQL); $gQ=$gRS->f("MinOrd"); if($gQ>0){ $ggQ=$gQ; } else{ $ggQ=1; } $PSCSN=$gRS->f("Product_Site_Classify_SN"); for ($i=0;$iEOF) { $Temp_Storage_SN = GetSN("Temp_Storage"); $Product_NO1 = $Product_NO[$i]; $SQL3 = "INSERT INTO Temp_Storage (Temp_Storage_SN, Company_SN, Product_SN, Product_NO, PHPSESSID, Quantity, Comment, Product_Site_Classify_SN,Inquiry_Template) "; $SQL3.= " VALUES ('$Temp_Storage_SN','$Company_SN','$Product_SN','$Product_NO1','$PHPSESSID','$ggQ','$Comment','$PSCSN','$Inquiry_Template')" ; } else { $Quantity = $RS1->Field("Quantity") + 1; $SQL3 = "Update Temp_Storage set Quantity = '$Quantity', Inquiry_Template = '$Inquiry_Template' WHERE Temp_Storage_SN =" . $RS1->Field("Temp_Storage_SN"); } ExecuteSQL($SQL3); } } elseif (count($Product_SN) != 0) { for ($i=0;$iEOF) { $gSQL="select MinOrd from Product where Product_SN=".$Product_SN[$i]; $gRS = new Recordset($gSQL); $gQ=$gRS->f("MinOrd"); if($gQ>0){ $ggQ=$gQ; } else{ $ggQ=1; } $Temp_Storage_SN = GetSN("Temp_Storage"); $Product_SN1 = $Product_SN[$i]; $SQL3 = "INSERT INTO Temp_Storage (Temp_Storage_SN, Company_SN, Product_SN, Product_NO, PHPSESSID, Quantity, Comment, Product_Site_Classify_SN,Inquiry_Template) "; $SQL3.= " VALUES ('$Temp_Storage_SN','$Company_SN','$Product_SN1','$word','$PHPSESSID','$ggQ','$Comment','$Product_Site_Classify_SN','$Inquiry_Template')" ; } else { $Quantity = $RS1->Field("Quantity") + 1; $Product_SN1 = $Product_SN[$i]; $SQL3 = "Update Temp_Storage set Quantity = '$Quantity', Inquiry_Template = '$Inquiry_Template' WHERE Temp_Storage_SN =" . $RS1->Field("Temp_Storage_SN"); } ExecuteSQL($SQL3); } } } else { if ($Submitcart == "Update") { for ($i=0;$i Inquiry EOF) { ?>