Fwd: [PHP-WEBMASTER] PDOStatement::execute() Description
| From: | Hannes Magnusson | Date: | Fri, 20 Aug 2010 19:07:08 +0000 |
| Subject: | Fwd: [PHP-WEBMASTER] PDOStatement::execute() Description | ||
| References: | 1 | Groups: | php.doc |
| Request: | Send a blank email to phpdoc+get-969382119@lists.php.net to get a copy of this message | ||
In case he didn't do it himself via edit.php.net...
-Hannes
---------- Forwarded message ----------
From: Bertold von Dormilich <Dormilich@netscape.net>
Date: Fri, Aug 13, 2010 at 10:50
Subject: [PHP-WEBMASTER] PDOStatement::execute() Description
To: php-webmaster@lists.php.net
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
--
PHP Webmaster List Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php