RE: [PHP-DB] How do I assign Oracle pakage variable's value to aphp variable?

From: Date: Wed, 08 May 2002 03:29:06 +0000
Subject: RE: [PHP-DB] How do I assign Oracle pakage variable's value to aphp variable?
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-19031@lists.php.net to get a copy of this message
I am sorry. It was my problem. I figured it how to do this. $sth = OCIParse ( $conn, "begin :myval := sess_var.pkg_var; end;"); OCIBindByName ( $sth, ":myval", $my_val, 10 ); $myret = OCIExecute ( $sth ); echo($my_val) Prince.. -----Original Message----- From: Paul Edmondson [mailto:paul@yospace.com] Sent: Tuesday, April 30, 2002 3:52 AM To: Prince Cc: php-db@lists.php.net Subject: Re: [PHP-DB] How do I assign Oracle pakage variable's value to aphp variable? What a good question. I've just had a quick look around the API and I think the only way would be to write a stored function to return the value. I could not find any functions to bind to those types of values without the stored functions. Have you had any other ideas on how to achieve this? Or even found the solution? On Mon, 2002-04-29 at 20:59, Prince wrote: > Hello, > > I have a package like the following one. > > creare or replace package my_pkg as > my_pkg_var varchar(10) defalut 'myVal'; > end my_pkg ; > > Now, I want to read this value into a php variable (say $my_php_var). How do > I do this? > > in PL/SQL, I can easily do this as > declare > tmp varchar2(10); > begin > tmp := my_pkg.my_pkg_var ; > end ; > / > > Thanks, > > > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php -- ------------------------------------------------------------ Paul Edmondson, Software Engineer Yospace: Creating Value for Wireless 7 The Courtyard, High Street, Staines, UK, TW18 4DR Tel: +44 1784 466388 Fax: +44 1784 466387 http://www.yospace.com

« previous php.db (#19031) next »