fix bug #40161: error in the example 1

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@227512 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Nuno Lopes 2007-01-18 15:30:06 +00:00
parent 36acb31fc4
commit 6520c3631a

View file

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='iso-8859-1'?>
<!-- $Revision: 1.13 $ -->
<!-- $Revision: 1.14 $ -->
<refentry id="function.PDO-prepare">
<refnamediv>
<refname>PDO->prepare()</refname>
@ -100,7 +100,7 @@
$sql = 'SELECT name, colour, calories
FROM fruit
WHERE calories < :calories AND colour = :colour';
$sth = $dbh->prepare($sql, array(PDO::ATTR_CURSOR, PDO::CURSOR_FWDONLY));
$sth = $dbh->prepare($sql, array(PDO::ATTR_CURSOR => PDO::CURSOR_FWDONLY));
$sth->execute(array(':calories' => 150, ':colour' => 'red'));
$red = $sth->fetchAll();
$sth->execute(array(':calories' => 175, ':colour' => 'yellow'));