From 5119196d17907c71c49766449c793511d622008e Mon Sep 17 00:00:00 2001 From: Dan Scott Date: Wed, 19 Oct 2005 21:18:19 +0000 Subject: [PATCH] Explicitly document 0-indexed nature of fetchColumn() param. git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@198807 c90b9560-bf6c-de11-be94-00142212c4b1 --- .../functions/PDOStatement-fetchColumn.xml | 20 ++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/reference/pdo/functions/PDOStatement-fetchColumn.xml b/reference/pdo/functions/PDOStatement-fetchColumn.xml index df9f85c4ce..319dcd0b06 100644 --- a/reference/pdo/functions/PDOStatement-fetchColumn.xml +++ b/reference/pdo/functions/PDOStatement-fetchColumn.xml @@ -1,5 +1,5 @@ - + @@ -29,9 +29,9 @@ column_number - Number of the column you wish to retrieve from the row. If no value is - supplied, PDOStatement::fetchColumn fetches the - first column. + 0-indexed number of the column you wish to retrieve from the row. If + no value is supplied, PDOStatement::fetchColumn + fetches the first column. @@ -66,10 +66,11 @@ $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"); $result = $sth->fetchColumn(); -print("$result\n"); +print("name = $result\n"); -$result = $sth->fetchColumn(); -print("$result\n"); +print("Fetch the second column from the next row in the result set:\n"); +$result = $sth->fetchColumn(1); +print("colour = $result\n"); ?> ]]> @@ -77,8 +78,9 @@ print("$result\n");