Returning values from oracle stored proc

wxdqz

New Member
hello - i created a stored proc with one in and one out variable:

>SELECT Customer_ID
>INTO Cust_ID_Out
>FROM Isu_Customer
>WHERE Email = Customer_Email AND ROWNUM=1;

The purpose is to return value 'Cust_ID_Out' to the php which calls this sp. the php code is as follows:

$s_sp = "begin ISU_CUSTOMER_GETBY_EMAIL('$sEmail',:Cust_ID_Out); end;";

$a_Sql_Parse = ociparse($cn_cur,$s_sp);
OCIBindByName($a_Sql_Parse, ":Cust_ID_Out", &$lCust_ID);

ociExecute($a_Sql_Parse);

Executing this code returns a warning of :OCIStmtExecute: OCI_NO_DATA.
This is regardless of if the record exists or not. Generally speaking, should i be able to grab values from the stored proc. in php using the "SELECT ... INTO" convention? Is this the corect way to do this? thanks - Adam
 
Back
Top