From 6520c3631a94a9915f7e93a2afd3caf88ab275c8 Mon Sep 17 00:00:00 2001 From: Nuno Lopes Date: Thu, 18 Jan 2007 15:30:06 +0000 Subject: [PATCH] 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 --- reference/pdo/functions/PDO-prepare.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/reference/pdo/functions/PDO-prepare.xml b/reference/pdo/functions/PDO-prepare.xml index 413ff5c885..8875fa306e 100644 --- a/reference/pdo/functions/PDO-prepare.xml +++ b/reference/pdo/functions/PDO-prepare.xml @@ -1,5 +1,5 @@ - + PDO->prepare() @@ -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'));