Re: [PHP4BETA] oci8 and empty LONG-Fields
| From: | thies at digicol dot de | Date: | Fri, 04 Feb 2000 17:48:22 +0000 |
| Subject: | Re: [PHP4BETA] oci8 and empty LONG-Fields | ||
| References: | 1 | Groups: | php.version4 |
| Request: | Send a blank email to php-version4+get-9819@lists.php.net to get a copy of this message | ||
On Fri, Feb 04, 2000 at 09:45:30AM +1300, Mark Kirkwood wrote:
> Dear all,
>
> I think his behaviour became and Oracle standard for embedded SQL as of Version 7.0 but seems
> to have been implemented more rigidly in 8.0 onwards for variables fetched w/o indicators. For a
> precompiled ( Pro*c that is ) type application you can turn off the Ora-1405 by using the option
> "unsafe_null=yes" at precompilation time, however I am not sure how this is handled within
> the oci8 library.
>
> Does oci8 support the concept of indicators ?, for instance doing
>
> fetch <cursor> into :var1 indicator :ind1; (where ind1 is some sort of small int )
not at all - i use indicatios with all oci-calls internally.
php4 has a special constant called NULL that will be set for
a NULL column-value.
the thing he is desribing is a bug, and i think it's fixed.
tc
>
> this avoids the ora-1405 thing ( and ind1 = -1 if var1 is null )
>
> Hope this does not merely add to the confusion....
>
> Cheers
>
> Mark
>
> > -----Original Message-----
> > From: thies@digicol.de [SMTP:thies@digicol.de]
> > Sent: Friday, 4 February 2000 09:22
> > To: Martin Trzaskalik
> > Cc: php4beta
> > Subject: Re: [PHP4BETA] oci8 and empty LONG-Fields
> >
> > On Thu, Feb 03, 2000 at 07:22:30PM +0100, Martin Trzaskalik wrote:
> > > php4 seems to react differently to empty LONG-Fields...
> >
> > which version are u using? (it should work)
> >
> > >
> > > The following code
> > >
> > > $query = 'select * from test';
> > > $stmt = OCIParse($conn, $query);
> > > $result = OCIExecute($stmt);
> > > $count = OCIFetchInto($stmt, $array, OCI_ASSOC+OCI_RETURN_NULLS);
> > > print "array=".serialize($array);
> > >
> > > leads to
> > >
> > > Warning: OCIFetchInto: ORA-01405: fetched column value is NULL
> > >
> > > when there is a LONG field that is NULL.
> > >
> > > If the warning comes up this row is not fetched. OCIFetchStatement
> > > returns an array where only the column names are set. It contains
> > > no values.
> > >
> > > With php3 I do not get the warning and the data is as expected.
> > >
> > > I would like to know wether this behavour is intentional and I have
> > > to use NVL functions or will some day php4 react just like php3?
> > >
> > > Or is there maybe a work around?
> > >
> > > Martin
> > >
> > > --
> > > PHP 4.0 Beta Mailing List
> > > <http://www.php.net/version4/>
> > > To unsubscribe, e-mail: php4beta-unsubscribe@lists.php.net
> > > For additional commands, e-mail: php4beta-help@lists.php.net
> > > To contact the list administrators, e-mail: php4beta-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
> >
> > --
> > PHP 4.0 Beta Mailing List
> > <http://www.php.net/version4/>
> > To unsubscribe, e-mail: php4beta-unsubscribe@lists.php.net
> > For additional commands, e-mail: php4beta-help@lists.php.net
> > To contact the list administrators, e-mail: php4beta-admin@lists.php.net
>
> --
> PHP 4.0 Beta Mailing List <http://www.php.net/version4/>
> To unsubscribe, e-mail: php4beta-unsubscribe@lists.php.net
> For additional commands, e-mail: php4beta-help@lists.php.net
> To contact the list administrators, e-mail: php4beta-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