PDOStatement::execute() Description
| From: | Bertold von Dormilich | Date: | Fri, 13 Aug 2010 08:50:37 +0000 |
| Subject: | PDOStatement::execute() Description | ||
| Groups: | php.webmaster | ||
| Request: | Send a blank email to php-webmaster+get-8734@lists.php.net to get a copy of this message | ||
Dear Webmasters,
I’d like to have corrected some issues I see with the description and examples of the PDOStatement->execute() manual entry.
in the description part, it should also list the PDOStatement->bindValue() method.
in the 1st amd 4th example the usage of PDOStatement->bindParam() IMO does not fits its intention (bind a variable to a placeholder). I’d use PDOStatement->bindValue() for the code in the examples (passing a value once, why should I bind the variable then?).
PDOStatement->bindParam() should be used when you either use PDO::PARAM_INPUT_OUTPUT or you do multiple executions with different values (which isn’t even mentioned in the PDOStatement->bindParam() manual entry).
cheers, Dormilich