[prev in list] [next in list] [prev in thread] [next in thread] 

List:       phpdoc
Subject:    [PHP-DOC] Fwd: [PHP-WEBMASTER] PDOStatement::execute() Description
From:       Hannes Magnusson <hannes.magnusson () gmail ! com>
Date:       2010-08-20 19:07:08
Message-ID: AANLkTi==dSLA2L3xDfkg=JNg9AiM8Q1LfHRo=T6gc5Gh () mail ! gmail ! com
[Download RAW message or body]

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

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic