|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2011-02-15 15:28 UTC] abrahala at gmail dot com
-Summary: PostgreSQL: cannot bind NULL value to statement
+Summary: PostgreSQL: cannot bind NULL value to statement
condition
[2011-02-15 15:28 UTC] abrahala at gmail dot com
[2011-07-30 23:36 UTC] dverite at gmail dot com
[2013-06-28 20:16 UTC] yohgaki@php.net
-Status: Open
+Status: Feedback
[2013-06-28 20:16 UTC] yohgaki@php.net
[2013-10-15 11:54 UTC] php-bugs at lists dot php dot net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Nov 03 03:00:01 2025 UTC |
Description: ------------ It seems to be impossible to pass NULL value to a PDO PostgreSQL statement neither with bindValue nor using '?'-format and $statement->execute(array(null)). Test script: --------------- $pdo = new PDO('pgsql:host=localhost;port=5432;dbname=db', 'user', 'pass'); $statement = $pdo->prepare('SELECT \'ok\' WHERE NULL IS :nullValue'); $statement->bindValue(':nullValue', null, PDO::PARAM_NULL); $statement->execute(); $result = $statement->fetchColumn(0); var_export($result); Expected result: ---------------- 'ok' Actual result: -------------- false