From:             [EMAIL PROTECTED]
Operating system: Windows 2000 Server
PHP version:      4.0.6
PHP Bug Type:     InterBase related
Bug description:  Bug with inserting NULLs using ibase_prepare()/ibase_execute()

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 bug report at: http://bugs.php.net/?id=12765&edit=1


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to