mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
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
This commit is contained in:
parent
c10d9cba0c
commit
5119196d17
1 changed files with 11 additions and 9 deletions
|
@ -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 @@ $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");
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
|
@ -77,8 +78,9 @@ print("$result\n");
|
|||
<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>
|
||||
|
|
Loading…
Reference in a new issue