note 90625 added to pdostatement.bindvalue

From: Date: Fri, 01 May 2009 00:19:54 +0000
Subject: note 90625 added to pdostatement.bindvalue
Groups: php.notes 
Request: Send a blank email to php-notes+get-154065@lists.php.net to get a copy of this message
If you want to bind a null value to a database field you must use 'NULL' in quotes (for MySQL): $stmt->bindValue(:fieldName, 'NULL'); not $stmt->bindValue(:fieldName, NULL); or $stmt->bindValue(:fieldName, null); Using PHP's null/NULL as a value doesn't work. ---- Server IP: 92.48.74.199 Probable Submitter: 82.3.6.181 ---- Manual Page -- http://www.php.net/manual/en/pdostatement.bindvalue.php Edit -- https://master.php.net/note/edit/90625 Del: integrated -- https://master.php.net/note/delete/90625/integrated Del: useless -- https://master.php.net/note/delete/90625/useless Del: bad code -- https://master.php.net/note/delete/90625/bad+code Del: spam -- https://master.php.net/note/delete/90625/spam Del: non-english -- https://master.php.net/note/delete/90625/non-english Del: in docs -- https://master.php.net/note/delete/90625/in+docs Del: other reasons-- https://master.php.net/note/delete/90625 Reject -- https://master.php.net/note/reject/90625 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#154065) next »