can OCIBindByName bind an in/out placeholder of plsql

From: Date: Tue, 06 Jun 2000 22:28:56 +0000
Subject: can OCIBindByName bind an in/out placeholder of plsql
Groups: php.db php.general 
Request: Send a blank email to php-db+get-235@lists.php.net to get a copy of this message
Hi : I have tried to use php4 OCI8 functions to access oracle database by utilizing PLSQL . There is no problem for me to call a plsql stored procedure with IN parameter or OUT parameter, However, I have problem to implement a PLSQL stored procedure with an IN/OUT parameter. Can OCIBindByName bind an in/out parameter of plsql ??? Can anyone help me about this ??? Thanks Frank I have two examples, the first one work, the second one does not. 1. The following code is the one work for IN or OUT parameter CIPLogon($DB_LOGIN, $DB_PASSWORD, $DB) $stmt = OCIParse($conn, "begin pk_session.USER_VALID('$user', '$passwd', :out_flag); end;"); OCIBindbyname($stmt, ":out_flag", $result, 7); OCIExecute($stmt); OCIFreeStatement($stmt); OCILogoff($conn); 2. The following code does not work, because :pSkinID is an IN/OUT parameter in the PLSQL stored procedure $conn = OCIPLogon($DB_LOGIN, $DB_PASSWORD, $DB); $stmt = OCIParse($conn, "begin PKG_SkinSrch.UPD_SKIN('$sUserID', :pSkinID); end;"); OCIBindbyname($stmt, ":pSkinID", $HTTP_POST_VARS[skinid], 5); OCIExecute($stmt); OCIFreeStatement($stmt); OCILogoff($conn);

« previous php.db (#235) next »