Re: Passing NULL to OCIBindByName()
| From: | thies at digicol dot de | Date: | Mon, 19 Jun 2000 12:39:00 +0000 |
| Subject: | Re: Passing NULL to OCIBindByName() | ||
| References: | 1 2 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-470@lists.php.net to get a copy of this message | ||
On Mon, Jun 19, 2000 at 05:47:05AM -0400, Fred M. Bulah wrote:
>
> Thanks. Did you see my earlier mail regarding invocation of functions?
> I've included a copy here.
>
>
> -----Original Message-----
> From: thies@digicol.de [mailto:thies@digicol.de]
> Sent: Monday, June 19, 2000 4:44 AM
> To: Fred M. Bulah
> Cc: php-db@lists.php.net
> Subject: Re: [PHP-DB] Passing NULL to OCIBindByName()
>
>
> On Sun, Jun 18, 2000 at 02:44:37PM -0400, Fred M. Bulah wrote:
> >
> > Question: How do you pass a NULL value using OCIBindByName()?
>
> $name = NULL;
> ocibindbyname($s,"name",&$name,0);
>
> >
> > --
> > PHP Database Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net
> > For additional commands, e-mail: php-db-help@lists.php.net
> > To contact the list administrators, e-mail: php-list-admin@lists.php.net
>
> --
>
> Thies C. Arntzen "One Big-Mac, Small Fries and a Coke!"
> Digital Collections Phone +49 40 235350 Fax +49 40 23535180
> Hammerbrookstr. 93 20097 Hamburg / Germany
> From: "Fred Bulah" <fredb@corecam.com>
> To: <php-db@lists.php.net>
> Subject: [PHP-DB] OCI8 Stored Procedure and Functions
> Date: Fri, 16 Jun 2000 18:28:38 -0400
> X-Mailer: Mozilla 4.7 [en] (X11; I; SunOS 5.8 i86pc)
> X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300
> X-Accept-Language: en
> list-unsubscribe:
> <mailto:php-db-unsubscribe@lists.php.net>
> list-help: <mailto:php-db-help@lists.php.net>
>
>
> I've defined a package that contains the following type, function and
> procedure:
>
> TYPE CustAcct IS RECORD
> (
> customerId NUMBER,
> accountId NUMBER
> );
>
> PROCEDURE isRegisteredP( userId IN VARCHAR2,
> ca_rec OUT CustAcct)
> IS
> u_id VARCHAR2(32);
> BEGIN
> u_id := userId;
> SELECT customerId, accountId INTO ca_rec FROM Customer WHERE userId = u_id;
> END isRegisteredP;
>
>
> FUNCTION isRegisteredF( userId IN VARCHAR2) return Customer%ROWTYPE
> IS
> u_id VARCHAR2(32);
> customerRec Customer%ROWTYPE;
> BEGIN
> u_id := userId;
> SELECT * INTO customerRec FROM Customer WHERE userId = u_id;
> return( customerRec );
> END isRegisteredF;
>
> Questions:
>
> - How do you execute a function in a package from OCIExecute()? Part of the
> problem
> is setting up the variable to store the return value which in this case is a
> record
> defined as the ROWTYPE of a table.
don't know about rowtype - but functions should be called
eiter usinf anonymouse PLSQL ("begin retval = funcname();
end") or using "select funcname() from dual". both should
work.
>
> - How do you execute a stored procedure that executes a select that has an
> output
> parameter declared as a table ROWTYPE or user-defined type ? The issue here
> is the
> binding to the output parameter.
i don't know ROWTYPE stuff at all - maybe send me a *TINY*
(10 lines php + 10 lines sql) testcase so i can see what
you're talking about.
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net
> For additional commands, e-mail: php-db-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>
--
Thies C. Arntzen "One Big-Mac, Small Fries and a Coke!"
Digital Collections Phone +49 40 235350 Fax +49 40 23535180
Hammerbrookstr. 93 20097 Hamburg / Germany