|   | php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
| 
 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits              [2007-04-01 18:35 UTC] justin dot hendrickson+pecl at gmail dot com
 | |||||||||||||||||||||||||||
|  Copyright © 2001-2025 The PHP Group All rights reserved. | Last updated: Fri Oct 31 03:00:01 2025 UTC | 
Description: ------------ Using PDO::PARAM_NULL when doing a bindParam()/bindValue() does not insert a NULL value. It appears to insert the default value instead. '' in (var)char/text fields, 0 in boolean fields, ect. Reproduce code: --------------- $stmt = 'INSERT INTO table (field) VALUES (:placeholder)'; $stmt->bindValue(':placeholder', PDO::PARAM_NULL); $stmt->execute(); Expected result: ---------------- `field` in `table` set to NULL Actual result: -------------- `field` in `table` set to default value