dbs Wed Oct 19 17:18:21 2005 EDT
Modified files: /phpdoc/en/reference/pdo/functions PDOStatement-fetchColumn.xml Log: Explicitly document 0-indexed nature of fetchColumn() param. http://cvs.php.net/diff.php/phpdoc/en/reference/pdo/functions/PDOStatement-fetchColumn.xml?r1=1.3&r2=1.4&ty=u Index: phpdoc/en/reference/pdo/functions/PDOStatement-fetchColumn.xml diff -u phpdoc/en/reference/pdo/functions/PDOStatement-fetchColumn.xml:1.3 phpdoc/en/reference/pdo/functions/PDOStatement-fetchColumn.xml:1.4 --- phpdoc/en/reference/pdo/functions/PDOStatement-fetchColumn.xml:1.3 Sun Sep 11 02:22:26 2005 +++ phpdoc/en/reference/pdo/functions/PDOStatement-fetchColumn.xml Wed Oct 19 17:18:19 2005 @@ -1,5 +1,5 @@ <?xml version='1.0' encoding='iso-8859-1'?> -<!-- $Revision: 1.3 $ --> +<!-- $Revision: 1.4 $ --> <!-- Generated by xml_proto.php v2.1. Found in /scripts directory of phpdoc. --> <refentry id="function.PDOStatement-fetchColumn"> <refnamediv> @@ -29,9 +29,9 @@ <term><parameter>column_number</parameter></term> <listitem> <para> - Number of the column you wish to retrieve from the row. If no value is - supplied, <function>PDOStatement::fetchColumn</function> fetches the - first column. + 0-indexed number of the column you wish to retrieve from the row. If + no value is supplied, <function>PDOStatement::fetchColumn</function> + fetches the first column. </para> </listitem> </varlistentry> @@ -66,10 +66,11 @@ /* 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"); ?> ]]> </programlisting> @@ -77,8 +78,9 @@ <screen> <![CDATA[ Fetch the first column from the next row in the result set: -lemon -orange +name = lemon +Fetch the second column from the next row in the result set: +colour = red ]]> </screen> </example>