svn: /phpdoc/en/trunk/reference/pdo/pdostatement/ fetchcolumn.xml
| From: | Maciej Sobaczewski | Date: | Tue, 09 Jun 2015 07:07:33 +0000 |
| Subject: | svn: /phpdoc/en/trunk/reference/pdo/pdostatement/ fetchcolumn.xml | ||
| Groups: | php.doc.cvs | ||
| Request: | Send a blank email to doc-cvs+get-13361@lists.php.net to get a copy of this message | ||
sobak Tue, 09 Jun 2015 07:07:33 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=336896
Log:
Close bug #69775 (fetchColumn() example is misleading)
Patch by cmb
Bug: https://bugs.php.net/69775 (Open) fetchColumn()
example is misleading
Changed paths:
U phpdoc/en/trunk/reference/pdo/pdostatement/fetchcolumn.xml
Modified: phpdoc/en/trunk/reference/pdo/pdostatement/fetchcolumn.xml
===================================================================
--- phpdoc/en/trunk/reference/pdo/pdostatement/fetchcolumn.xml 2015-06-09 00:31:01 UTC (rev 336895)
+++ phpdoc/en/trunk/reference/pdo/pdostatement/fetchcolumn.xml 2015-06-09 07:07:33 UTC (rev 336896)
@@ -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 @@
&example.outputs;
<screen>
<![CDATA[
-Fetch the first column from the next row in the result set:
+Fetch the first column from the first row in the result set:
name = lemon
-Fetch the second column from the next row in the result set:
+Fetch the second column from the second row in the result set:
colour = red
]]>
</screen>