From 7eb76b1f1f49952adf592aca3f4a2bb08c1942ca Mon Sep 17 00:00:00 2001 From: Maciej Sobaczewski Date: Tue, 9 Jun 2015 07:07:33 +0000 Subject: [PATCH] Close bug #69775 (fetchColumn() example is misleading) Patch by cmb git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@336896 c90b9560-bf6c-de11-be94-00142212c4b1 --- reference/pdo/pdostatement/fetchcolumn.xml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/reference/pdo/pdostatement/fetchcolumn.xml b/reference/pdo/pdostatement/fetchcolumn.xml index 60fabe32e2..1e722824f2 100644 --- a/reference/pdo/pdostatement/fetchcolumn.xml +++ b/reference/pdo/pdostatement/fetchcolumn.xml @@ -72,12 +72,11 @@ $sth = $dbh->prepare("SELECT name, colour FROM fruit"); $sth->execute(); -/* Fetch the first column from the next row in the result set */ -print("Fetch the first column from the next row in the result set:\n"); +print("Fetch the first column from the first row in the result set:\n"); $result = $sth->fetchColumn(); print("name = $result\n"); -print("Fetch the second column from the next row in the result set:\n"); +print("Fetch the second column from the second row in the result set:\n"); $result = $sth->fetchColumn(1); print("colour = $result\n"); ?> @@ -86,9 +85,9 @@ print("colour = $result\n"); &example.outputs;