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
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
49 + 15 = ?
Subscribe to this entry?

 
 [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-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 12:01:27 2024 UTC