Re: can OCIBindByName bind an in/out placeholder of plsql

From: Date: Wed, 07 Jun 2000 04:49:44 +0000
Subject: Re: can OCIBindByName bind an in/out placeholder of plsql
References: 1  Groups: php.db php.general 
Request: Send a blank email to php-general+get-1158@lists.php.net to get a copy of this message
Try OCIBindbyname($stmt, ":out_flag", &$result, 7); (Use &$result); Vadim Tkachenko. ----- Original Message ----- From: Frank Chang <cfrank@datatalk-ca.com> To: <php-general@lists.php.net> Cc: <php-db@lists.php.net> Sent: Wednesday, June 07, 2000 1:28 AM Subject: [PHP-GENERAL] can OCIBindByName bind an in/out placeholder of plsql > 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); > > ---------------------------------------------------------------------------- ---- > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.general (#1158) next »