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");