php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login

Patch fetchcolumn-example for PDO Core Bug #69775

Patch version 2015-06-08 19:34 UTC

Return to Bug #69775 | Download this patch
Patch Revisions:

Developer: cmb

Index: en/reference/pdo/pdostatement/fetchcolumn.xml
===================================================================
--- en/reference/pdo/pdostatement/fetchcolumn.xml	(revision 336883)
+++ en/reference/pdo/pdostatement/fetchcolumn.xml	(working copy)
@@ -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>
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 23 12:01:31 2024 UTC