reference/mysql/functions/mysql-fetch-field.xml
65e697ff671608989432a6e6bf8ae8128b2be2c7
...
...
@@ -6,6 +6,16 @@
6
6
<refpurpose>Get column information from a result and return as an object</refpurpose>
7
7
</refnamediv>
8
8

9
+
<refsynopsisdiv>
10
+
<warning>
11
+
&mysql.alternative.note;
12
+
<simplelist role="alternatives">
13
+
<member><function>mysqli_fetch_field</function></member>
14
+
<member><methodname>PDOStatement::getColumnMeta</methodname></member>
15
+
</simplelist>
16
+
</warning>
17
+
</refsynopsisdiv>
18
+

9
19
<refsect1 role="description">
10
20
&reftitle.description;
11
21
<methodsynopsis>
...
...
@@ -53,7 +63,7 @@
53
63
</listitem>
54
64
<listitem>
55
65
<simpara>
56
-
table - name of the table the column belongs to
66
+
table - name of the table the column belongs to, which is the alias name if one is defined
57
67
</simpara>
58
68
</listitem>
59
69
<listitem>
...
...
@@ -162,6 +172,13 @@ mysql_free_result($result);
162
172
<refsect1 role="notes">
163
173
&reftitle.notes;
164
174
&database.field-case;
175
+
<note>
176
+
<para>
177
+
If field or tablenames are aliased in the SQL query the aliased name will
178
+
be returned. The original name can be retrieved for instance by using
179
+
<methodname>mysqli_result::fetch_field</methodname>.
180
+
</para>
181
+
</note>
165
182
</refsect1>
166
183

167
184
<refsect1 role="seealso">
168
185