#41538 [NEW]: Stange behavior when binding NULL variable
| From: | leligeour at ensiie dot fr | Date: | Wed, 30 May 2007 08:59:26 +0000 |
| Subject: | #41538 [NEW]: Stange behavior when binding NULL variable | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-113186@lists.php.net to get a copy of this message | ||
From: leligeour at ensiie dot fr
Operating system: Linux - FC6 - x86_64
PHP version: 5.2.2
PHP Bug Type: OCI8 related
Bug description: Stange behavior when binding NULL variable
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 bug report at http://bugs.php.net/?id=41538&edit=1
--
Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=41538&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=41538&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=41538&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=41538&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=41538&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=41538&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=41538&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=41538&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=41538&r=support
Expected behavior: http://bugs.php.net/fix.php?id=41538&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=41538&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=41538&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=41538&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=41538&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=41538&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=41538&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=41538&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=41538&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=41538&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=41538&r=mysqlcfg