Bug #12765 Updated: Bug with inserting NULLs using ibase_prepare()/ibase_execute()
| From: | flying at dom dot natm dot ru | Date: | Mon, 11 Feb 2002 15:20:44 +0000 |
| Subject: | Bug #12765 Updated: Bug with inserting NULLs using ibase_prepare()/ibase_execute() | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-135@lists.php.net to get a copy of this message | ||
ID: 12765
Updated by: flying@dom.natm.ru
Reported By: flying@dom.natm.ru
-Status: Open
+Status: Closed
Bug Type: InterBase related
Operating System: Windows 2000 Server
PHP Version: 4.0.6
New Comment:
This bug is closed by a patch, provided by Jeremy Bettis
(http://marc.theaimsgroup.com/?l=php-dev&m=99963772828804&w=2).
Have tested it with version 4.1.1 - works properly.
Previous Comments:
------------------------------------------------------------------------
[2001-08-15 08:23:13] flying@dom.natm.ru
Environment:
- Windows 2000 Server
- Apache v1.3.20 (binaries from www.apache.org)
- PHP v4.0.6 (binaries from www.php.net)
- InterBase v6.0.0.627 (binaries from www.borland.com)
1. Let's create very simple database:
-----------------------------------------------------------------
CREATE DATABASE 'c:\db\test.gdb'
USER 'user' PASSWORD 'password';
CREATE TABLE TEST_TABLE (
INT_VALUE INTEGER,
STR_VALUE VARCHAR(50));
COMMIT WORK;
-----------------------------------------------------------------
2. Create very simple PHP script:
-----------------------------------------------------------------
<?php
$ib = ibase_connect('c:\db\test.gdb','user','password');
$query = ibase_prepare($ib,'insert into TEST_TABLE_2(INT_VALUE,
STR_VALUE) values (?, ?)');
$rs = ibase_execute($query,1,null);
ibase_close($ib);
?>
-----------------------------------------------------------------
After this script will be executed, TEST_TABLE table will contain a row
with STR_VALUE='' instead of NULL!
However inserting the same data through ibase_query() works properly.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=12765&edit=1