0
我有一個問題關於存儲的過程,所以我有這個程序保存:Oracle存儲過程在PHP處理
CREATE OR REPLACE PROCEDURE WELTESADMIN.TOTALFABRICATION
(SUBCONT IN VARCHAR, PROJECT IN VARCHAR, TOTALFABRICATIONRESULT OUT NUMBER) AS
BEGIN
SELECT FABRICATION.MARKING + FABRICATION.CUTTING + FABRICATION.ASSEMBLY + FABRICATION.WELDING +
FABRICATION.DRILLING + FABRICATION.FINISHING
INTO TOTALFABRICATIONRESULT
FROM FABRICATION
WHERE SUBCONT_ID = SUBCONT
AND PROJECT_NAME = PROJECT;
END;
和IM的處理,在PHP等,
$subcontValue = "RIYANTO";
$projectValue = "PROCESSHOUSE";
$sql = "BEGIN TOTALFABRICATION(:SUBCONT, :PROJECT); END;";
$stmt = oci_parse($conn, $sql);
oci_bind_by_name($stmt, ":SUBCONT", $subcontValue);
oci_bind_by_name($stmt, ":PROJECT", $projectValue);
oci_define_by_name($stmt, "TOTALFABRICATIONRESULT", $result);
oci_execute($stmt);
echo $result;
我相信,提供的所有變量都是正確的,連接是好的,並且可以在SQL PLUS 中處理,而不是在im端獲得這個錯誤,
警告:oci_execute():ORA-06550:第1行,第7列:PLS-00306:在調用'TOTALFABRICATION'時出錯的數量或類型參數ORA-06550:第1行,第7列:PL/SQL:語句忽略在C:\ XAMPP \ htdocs中\ WeltesInformationCenter \ newEmptyPHP.php上線39
感謝sylvain的建議 – marmar 2014-09-23 03:10:21