reference/pgsql/functions/pg-fetch-row.xml
cfeb14a38b666f6a3fc73da70f4a90fbe115e53f
...
...
@@ -1,7 +1,7 @@
1
1
<?xml version="1.0" encoding="utf-8"?>
2
2
<!-- $Revision$ -->
3
3
<!-- splitted from ./en/functions/pgsql.xml, last change in rev 1.2 -->
4
-
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.pg-fetch-row">
4
+
<refentry xml:id="function.pg-fetch-row" xmlns="http://docbook.org/ns/docbook">
5
5
<refnamediv>
6
6
<refname>pg_fetch_row</refname>
7
7
<refpurpose>Get a row as an enumerated array</refpurpose>
...
...
@@ -10,15 +10,14 @@
10
10
<refsect1 role="description">
11
11
&reftitle.description;
12
12
<methodsynopsis>
13
-
<type>array</type><methodname>pg_fetch_row</methodname>
14
-
<methodparam><type>resource</type><parameter>result</parameter></methodparam>
15
-
<methodparam choice="opt"><type>int</type><parameter>row</parameter></methodparam>
16
-
<!-- Undocumented confusing feature: <methodparam choice="opt"><type>int</type><parameter>result_type</parameter></methodparam> -->
13
+
<type class="union"><type>array</type><type>false</type></type><methodname>pg_fetch_row</methodname>
14
+
<methodparam><type>PgSql\Result</type><parameter>result</parameter></methodparam>
15
+
<methodparam choice="opt"><type class="union"><type>int</type><type>null</type></type><parameter>row</parameter><initializer>&null;</initializer></methodparam>
16
+
<methodparam choice="opt"><type>int</type><parameter>mode</parameter><initializer><constant>PGSQL_NUM</constant></initializer></methodparam>
17
17
</methodsynopsis>
18
18
<para>
19
19
<function>pg_fetch_row</function> fetches one row of data from
20
-
the result associated with the specified
21
-
<parameter>result</parameter> resource.
20
+
the result associated with the specified <parameter>result</parameter> instance.
22
21
</para>
23
22
&database.fetch-null;
24
23
</refsect1>
...
...
@@ -30,11 +29,7 @@
30
29
<varlistentry>
31
30
<term><parameter>result</parameter></term>
32
31
<listitem>
33
-
<para>
34
-
PostgreSQL query result resource, returned by <function>pg_query</function>,
35
-
<function>pg_query_params</function> or <function>pg_execute</function>
36
-
(among others).
37
-
</para>
32
+
&pgsql.parameter.result;
38
33
</listitem>
39
34
</varlistentry>
40
35
<varlistentry>
...
...
@@ -46,6 +41,12 @@
46
41
</para>
47
42
</listitem>
48
43
</varlistentry>
44
+
<varlistentry>
45
+
<term><parameter>mode</parameter></term>
46
+
<listitem>
47
+
&pgsql.parameter.mode;
48
+
</listitem>
49
+
</varlistentry>
49
50
</variablelist>
50
51
</para>
51
52
</refsect1>
...
...
@@ -65,26 +66,19 @@
65
66

66
67
<refsect1 role="changelog">
67
68
&reftitle.changelog;
68
-
<para>
69
-
<informaltable>
70
-
<tgroup cols="2">
71
-
<thead>
72
-
<row>
73
-
<entry>&Version;</entry>
74
-
<entry>&Description;</entry>
75
-
</row>
76
-
</thead>
77
-
<tbody>
78
-
<row>
79
-
<entry>4.1.0</entry>
80
-
<entry>
81
-
The parameter <parameter>row</parameter> became optional.
82
-
</entry>
83
-
</row>
84
-
</tbody>
85
-
</tgroup>
86
-
</informaltable>
87
-
</para>
69
+
<informaltable>
70
+
<tgroup cols="2">
71
+
<thead>
72
+
<row>
73
+
<entry>&Version;</entry>
74
+
<entry>&Description;</entry>
75
+
</row>
76
+
</thead>
77
+
<tbody>
78
+
&pgsql.changelog.result-object;
79
+
</tbody>
80
+
</tgroup>
81
+
</informaltable>
88
82
</refsect1>
89
83

90
84
<refsect1 role="examples">
...
...
@@ -98,13 +92,13 @@
98
92

99
93
$conn = pg_pconnect("dbname=publisher");
100
94
if (!$conn) {
101
-
echo "An error occured.\n";
95
+
echo "An error occurred.\n";
102
96
exit;
103
97
}
104
98

105
99
$result = pg_query($conn, "SELECT author, email FROM authors");
106
100
if (!$result) {
107
-
echo "An error occured.\n";
101
+
echo "An error occurred.\n";
108
102
exit;
109
103
}
110
104

...
...
@@ -132,7 +126,6 @@ while ($row = pg_fetch_row($result)) {
132
126
</para>
133
127
</refsect1>
134
128
</refentry>
135
-

136
129
<!-- Keep this comment at the end of the file
137
130
Local variables:
138
131
mode: sgml
139
132