#41538 [Opn->Bgs]: Stange behavior when binding NULL variable

From: Date: Wed, 30 May 2007 09:07:43 +0000
Subject: #41538 [Opn->Bgs]: Stange behavior when binding NULL variable
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-113188@lists.php.net to get a copy of this message
ID: 41538 Updated by: tony2001@php.net Reported By: leligeour at ensiie dot fr -Status: Open +Status: Bogus Bug Type: OCI8 related Operating System: Linux - FC6 - x86_64 PHP Version: 5.2.2 New Comment: Right, this is how it should work. Previous Comments: ------------------------------------------------------------------------ [2007-05-30 08:59:26] leligeour at ensiie dot fr Description: ------------ Hi, I'm trying to insert NULL value into a Orcale field (whether VARCHAR2 or NUMBER) using oci_bind_by_name. I think that the NULL vars are not handled properly. Expected result: ---------------- I expected something similar to : 1. Inserting "" in a VARCHAR2 should result in an empty field in Oracle (and not a NULL entry) 2. Inserting NULL in a VARCHAR2 should result in a NULL entry in Oracle 3. Inserting NULL in a NUMBER should result in a NULL entry in Oracle I don't think if it should be the default behavior, but it's definitely something that should be possible using php NULL variable. Actual result: -------------- Since this behavior is not documented in the function's help page, here is what I observe: 1. when using SQLT_CHR NULL is inserted as soon as an empty string or NULL is entered 2. when using SQLT_INT, 0 is inserting when NULL is entered ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=41538&edit=1

« previous php.bugs (#113188) next »