php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #12765 Bug with inserting NULLs using ibase_prepare()/ibase_execute()
Submitted: 2001-08-15 08:23 UTC Modified: 2002-02-11 10:20 UTC
From: flying at dom dot natm dot ru Assigned:
Status: Closed Package: InterBase related
PHP Version: 4.0.6 OS: Windows 2000 Server
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: flying at dom dot natm dot ru
New email:
PHP Version: OS:

 

 [2001-08-15 08:23 UTC] flying at dom dot natm dot 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.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-02-11 10:20 UTC] flying at dom dot natm dot ru
 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.
 
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Sat May 21 03:05:45 2022 UTC