Re: Bug #14922: OCIBindByName forcing length to 1, even though 0 is a valid length

From: Date: Tue, 08 Jan 2002 18:51:14 +0000
Subject: Re: Bug #14922: OCIBindByName forcing length to 1, even though 0 is a valid length
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-76272@lists.php.net to get a copy of this message
On Mon, Jan 07, 2002 at 11:37:16PM -0000, alester@flr.follett.com wrote: > From: alester@flr.follett.com > Operating system: Solaris > PHP version: 4.1.0 > PHP Bug Type: OCI8 related > Bug description: OCIBindByName forcing length to 1, even though 0 is a valid length > > It seems that the when oci8.c forces value_sz to 1 if it's 0 is bypassing a > perfectly valid use of a length of 0: To signify a null. > > See: > > http://download-west.oracle.com/otndoc/oracle9i/901_doc/appdev.901/a89857/oci03typ.htm to pass a null thru a bound variable simply assign the special value NULL to the bound php-variable. the size supplied to ocibindbyname is simple the max-length of the inbound variable. ocibindbyname($stmt,"NAME",$name,32); $name = NULL; ociexecute($stmt); -> ":NAME" will have the value null in the query please verify and close the report. tc

« previous php.dev (#76272) next »