note 73155 added to ref.pdo

From: Date: Sun, 11 Feb 2007 08:07:27 +0000
Subject: note 73155 added to ref.pdo
Groups: php.notes 
Request: Send a blank email to php-notes+get-123235@lists.php.net to get a copy of this message
In response to letsgolee at lycos dot co dot kr: > you cannot set a variable like string or int as a second parameter > when you use bindParam() function. > > $stmt->bindParam(1, 50); // NOT WORK! If you read the manual, it says: "PDOStatement->bindParam() — Binds a parameter to the specified variable name" Note the "specified variable name" part. Instead, you want $stmt->bindValue() "PDOStatement->bindValue() — Binds a value to a parameter" ---- Server IP: 64.71.164.2 Probable Submitter: 71.206.157.165 ---- Manual Page -- http://www.php.net/manual/en/ref.pdo.php Edit -- https://master.php.net/note/edit/73155 Del: integrated -- https://master.php.net/note/delete/73155/integrated Del: useless -- https://master.php.net/note/delete/73155/useless Del: bad code -- https://master.php.net/note/delete/73155/bad+code Del: spam -- https://master.php.net/note/delete/73155/spam Del: non-english -- https://master.php.net/note/delete/73155/non-english Del: in docs -- https://master.php.net/note/delete/73155/in+docs Del: other reasons-- https://master.php.net/note/delete/73155 Reject -- https://master.php.net/note/reject/73155 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#123235) next »