note 97162 added to pdo.prepared-statements

From: Date: Tue, 06 Apr 2010 01:38:53 +0000
Subject: note 97162 added to pdo.prepared-statements
Groups: php.notes 
Request: Send a blank email to php-notes+get-167717@lists.php.net to get a copy of this message
Note that when using name parameters with bindParam, the name itself, cannot contain a dash '-'. example: <?php $stmt = $dbh->prepare ("INSERT INTO user (firstname, surname) VALUES (:f-name, :s-name)"); $stmt -> bindParam(':f-name', 'John'); $stmt -> bindParam(':s-name', 'Smith'); $stmt -> execute(); ?> The dashes in 'f-name' and 's-name' should be replaced with an underscore or no dash at all. See http://bugs.php.net/43130 Adam ---- Server IP: 69.147.83.197 Probable Submitter: 124.183.136.12 ---- Manual Page -- http://www.php.net/manual/en/pdo.prepared-statements.php Edit -- https://master.php.net/note/edit/97162 Del: integrated -- https://master.php.net/note/delete/97162/integrated Del: useless -- https://master.php.net/note/delete/97162/useless Del: bad code -- https://master.php.net/note/delete/97162/bad+code Del: spam -- https://master.php.net/note/delete/97162/spam Del: non-english -- https://master.php.net/note/delete/97162/non-english Del: in docs -- https://master.php.net/note/delete/97162/in+docs Del: other reasons-- https://master.php.net/note/delete/97162 Reject -- https://master.php.net/note/reject/97162 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#167717) next »