FAQ
Edit report at http://pear.php.net/bugs/bug.php?id=16314&edit=1

ID: 16314
Updated by: daniel.oconnor@gmail.com
Reported By: jan at horde dot org
Summary: Turning empty columns incorrectly to NULL
-Status: Feedback
+Status: Open
Type: Bug
Package: MDB2
Package Version: 2.5.0b2
PHP Version: Irrelevant
Assigned To: quipo
Roadmap Versions:
New Comment:

-Status: Feedback
+Status: Open



Previous Comments:
------------------------------------------------------------------------

[2009-06-20 18:59:27] yunosh

I can reproduce this on two different servers with different MDB2
versions, different MySQL versions, different distributions:

openSUSE 11.0
MySQL 5.0.51a
MDB2 2.5.0b2 beta
MDB2_Driver_mysql 1.5.0b1 beta

Ubuntu 9.04
MySQL 5.0.75
MDB2 2.4.1 stable
MDB2_Driver_mysql 1.4.1 stable

------------------------------------------------------------------------

[2009-06-20 18:33:43] quipo

-Status: Open
+Status: Feedback
-Assigned To:
+Assigned To: quipo
I tried your example, an empty string is inserted. Can you double-check
the example above?
If you still experience the issue, please provide some info about your
setup.

------------------------------------------------------------------------

[2009-06-16 16:50:47] yunosh

CREATE TABLE `test` (
`id` varchar(255) NOT NULL,
PRIMARY KEY (`id`)
)

require_once 'MDB2.php';
$db = MDB2::factory('mysql://horde:pass@localhost/horde');
$db->setOption('field_case', CASE_LOWER);
$db->setOption('portability', MDB2_PORTABILITY_FIX_CASE |
MDB2_PORTABILITY_ERRORS | MDB2_PORTABILITY_FIX_ASSOC_FIELD_NAMES);
$stmt = $db->prepare('INSERT INTO test (id) VALUES (?)', null,
MDB2_PREPARE_MANIP);
var_dump($stmt->execute(array('')));

------------------------------------------------------------------------

[2009-06-16 13:22:08] cweiske

Can you give us some example code? I know that it worked for me 2 weeks
ago.

------------------------------------------------------------------------

[2009-06-10 18:47:57] yunosh

Description:
------------
In MDB2_Statement_Common::_execute(), empty values are casted to NULL,
even if MDB2_PORTABILITY_EMPTY_TO_NULL is not set.

------------------------------------------------------------------------

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppear-bugs @
categoriesphp
postedSep 29, '11 at 8:12a
activeSep 29, '11 at 8:12a
posts1
users1
websitepear.php.net

1 user in discussion

Daniel Oconnor: 1 post

People

Translate

site design / logo © 2022 Grokbase