0
실패 :오라클의 PHP OCI의 prcedure 내가 <code>GET_Card_TRANS</code> 프로 시저를 실행하려고 할 때, 나는 다음과 같은 오류를 얻고있다
[code] => 6550
[message] => ORA-06550: line 6, column 21:
PLS-00103: Encountered the symbol "" when expecting one of the following:
. () , * @ % & = - + </> at in is mod remainder not rem =>
<an exponent (**)> <> or != or ~= >= <= <> and or like like2
like4 likec between || indicator multiset member submultiset
[offset] => 155
[sqltext] => BEGIN
WEB_SHOW.GET_Card_TRANS(
:User_Id,
:Pswd,
:vcard_id
:sdate
:EDATE
:Vcond
:CARD_TRANS_data
);
END;
이것은 PHP 코드입니다, 아마
<?php
// Connect to database
$conn = oci_connect("xxx", "yyy", "aaaa:bb/cc", 'dd');
if (!$conn) {
$e = oci_error($conn);
print_r($e);
exit ("Connection failed.");
}
$user_id = 'demo';
$password = 'password';
$vcard_id = '1-0';
$start_date = '01-01-2016';
$end_date = '01-01-2016';
$condition = '1';
$sql = "BEGIN
web_show.GET_Card_TRANS(
:User_Id,
:Pswd,
:vcard_id
:sdate
:EDATE
:Vcond
:CARD_TRANS_data
);
END;";
$stmt = oci_parse($conn, $sql);
oci_bind_by_name($stmt, ':User_Id', $user_id );
oci_bind_by_name($stmt, ':Pswd', $password );
oci_bind_by_name($stmt, ':vcard_id', $vcard_id );
oci_bind_by_name($stmt, ':sdate', $start_date);
oci_bind_by_name($stmt, ':EDATE', $end_date );
oci_bind_by_name($stmt, ':Vcond', $condition );
// Create a new cursor resource
$curs = oci_new_cursor($conn);
// Bind the cursor resource to the Oracle argument
oci_bind_by_name($stmt,":CARD_TRANS_data",$curs,-1,OCI_B_CURSOR);
if (!oci_execute($stmt)) {
$e = oci_error($stmt);
print_r($e);
exit("Procedure Failed.");
}
// Execute the cursor
if (!oci_execute($curs, OCI_DEFAULT)) {
$e = oci_error($curs);
print_r($e);
exit("Execute cursor Failed.");
}
while (($row = oci_fetch_array($curs, OCI_ASSOC+OCI_RETURN_NULLS)) != false) {
print_r($row);
//echo $row['FIRST_NAME'] . "<br />\n";
}
oci_free_statement($stmt);
oci_free_statement($curs);
oci_close($conn);
?>
하면 더 자세한 정보를 제공 할 수있는 것? –
'GET_Card_TRANS' 코드를 보여주세요. – Kacper
GET_Card_TRANS 코드 없이는 말하기 어렵지만 어딘가에서 괄호 나 세미콜론이 누락 될 수 있습니다. –