[prev in list] [next in list] [prev in thread] [next in thread] 

List:       php-doc-cvs
Subject:    [DOC-CVS] [doc-en] master: Add missing properties for mysqli_fetch_fields, mysqli_fetch_field and my
From:       schlndh via GitHub <noreply () php ! net>
Date:       2024-04-22 13:27:21
Message-ID: efarGHEouZn9nvRtSfumt91fvyBwwKNSeAqGrto () main ! php ! net
[Download RAW message or body]

Author: schlndh (schlndh)
Committer: GitHub (web-flow)
Pusher: Girgias
Date: 2024-04-22T14:27:14+01:00

Commit: https://github.com/php/doc-en/commit/5152c78db935ea2463e20a01ae0e3f3573314d78
Raw diff: https://github.com/php/doc-en/commit/5152c78db935ea2463e20a01ae0e3f3573314d78.diff


Add missing properties for mysqli_fetch_fields, mysqli_fetch_field and \
mysqli_fetch_field_direct (#3306)

Changed paths:
  M  reference/mysqli/mysqli_result/fetch-field-direct.xml
  M  reference/mysqli/mysqli_result/fetch-field.xml
  M  reference/mysqli/mysqli_result/fetch-fields.xml


Diff:

diff --git a/reference/mysqli/mysqli_result/fetch-field-direct.xml \
b/reference/mysqli/mysqli_result/fetch-field-direct.xml index \
                c6eef6e6e5a5..4377881840d6 100644
--- a/reference/mysqli/mysqli_result/fetch-field-direct.xml
+++ b/reference/mysqli/mysqli_result/fetch-field-direct.xml
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
 <!-- $Revision$ -->
-<refentry xml:id="mysqli-result.fetch-field-direct" \
xmlns="http://docbook.org/ns/docbook"> +<refentry \
xml:id="mysqli-result.fetch-field-direct" xmlns="http://docbook.org/ns/docbook" \
xmlns:xi="http://www.w3.org/2001/XInclude">  <refnamediv>
   <refname>mysqli_result::fetch_field_direct</refname>
   <refname>mysqli_fetch_field_direct</refname>
@@ -51,65 +51,9 @@
    if no field information for specified <parameter>index</parameter> is
    available.
   </para>
-  <para>
-  <table xml:id="mysqli-result.fetch-field-direct.returnvalues">
-   <title>Object attributes</title>
-   <tgroup cols="2">
-    <thead>
-     <row>
-      <entry>Attribute</entry>
-      <entry>Description</entry>
-     </row>
-    </thead>
-    <tbody>
-     <row>
-      <entry>name</entry>
-      <entry>The name of the column</entry>
-     </row>
-     <row>
-      <entry>orgname</entry>
-      <entry>Original column name if an alias was specified</entry>
-     </row>
-     <row>
-      <entry>table</entry>
-      <entry>The name of the table this field belongs to (if not calculated)</entry>
-     </row>
-     <row>
-      <entry>orgtable</entry>
-      <entry>Original table name if an alias was specified</entry>
-     </row>
-     <row>
-      <entry>def</entry>
-      <entry>The default value for this field, represented as a string</entry>
-     </row>
-     <row>
-      <entry>max_length</entry>
-      <entry>The maximum width of the field for the result set. As of PHP 8.1, this \
                value is always <literal>0</literal>.</entry>
-     </row>
-     <row>
-      <entry>length</entry>
-      <entry>The width of the field, as specified in the table definition.</entry>
-     </row>
-     <row>
-      <entry>charsetnr</entry>
-      <entry>The character set number for the field.</entry>
-     </row>
-     <row>
-      <entry>flags</entry>
-      <entry>An integer representing the bit-flags for the field.</entry>
-     </row>
-     <row>
-      <entry>type</entry>
-      <entry>The data type used for this field</entry>
-     </row>
-     <row>
-      <entry>decimals</entry>
-      <entry>The number of decimals used (for numeric fields)</entry>
-     </row>
-    </tbody>
-   </tgroup>
-  </table>
-  </para>
+  <xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) \
xpointer(id('mysqli-result.fetch-fields')/db:refsect1[@role='returnvalues']/db:table)">
 +   <xi:fallback/>
+  </xi:include>
  </refsect1>
 
  <refsect1 role="examples">
diff --git a/reference/mysqli/mysqli_result/fetch-field.xml \
b/reference/mysqli/mysqli_result/fetch-field.xml index e62ce0e5ce2e..43c2430b6c71 \
                100644
--- a/reference/mysqli/mysqli_result/fetch-field.xml
+++ b/reference/mysqli/mysqli_result/fetch-field.xml
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
 <!-- $Revision$ -->
-<refentry xml:id="mysqli-result.fetch-field" xmlns="http://docbook.org/ns/docbook">
+<refentry xml:id="mysqli-result.fetch-field" xmlns="http://docbook.org/ns/docbook" \
xmlns:xi="http://www.w3.org/2001/XInclude">  <refnamediv>
   <refname>mysqli_result::fetch_field</refname>
   <refname>mysqli_fetch_field</refname>
@@ -41,73 +41,9 @@
    Returns an object which contains field definition information or &false;
    if no field information is available.
   </para>
-  <para>
-  <table xml:id="mysqli-result.fetch-field.returnvalues">
-   <title>Object properties</title>
-   <tgroup cols="2">
-    <thead>
-     <row>
-      <entry>Property</entry>
-      <entry>Description</entry>
-     </row>
-    </thead>
-    <tbody>
-     <row>
-      <entry>name</entry>
-      <entry>The name of the column</entry>
-     </row>
-     <row>
-      <entry>orgname</entry>
-      <entry>Original column name if an alias was specified</entry>
-     </row>
-     <row>
-      <entry>table</entry>
-      <entry>The name of the table this field belongs to (if not calculated)</entry>
-     </row>
-     <row>
-      <entry>orgtable</entry>
-      <entry>Original table name if an alias was specified</entry>
-     </row>
-     <row>
-      <entry>def</entry>
-      <entry>Reserved for default value, currently always ""</entry>
-     </row>
-     <row>
-      <entry>db</entry>
-      <entry>The name of the database</entry>
-     </row>
-     <row>
-      <entry>catalog</entry>
-      <entry>The catalog name, always "def"</entry>
-     </row>
-     <row>
-      <entry>max_length</entry>
-      <entry>The maximum width of the field for the result set.</entry>
-     </row>
-     <row>
-      <entry>length</entry>
-      <entry>The width of the field, as specified in the table definition.</entry>
-     </row>
-     <row>
-      <entry>charsetnr</entry>
-      <entry>The character set number for the field.</entry>
-     </row>
-     <row>
-      <entry>flags</entry>
-      <entry>An integer representing the bit-flags for the field.</entry>
-     </row>
-     <row>
-      <entry>type</entry>
-      <entry>The data type used for this field</entry>
-     </row>
-     <row>
-      <entry>decimals</entry>
-      <entry>The number of decimals used (for integer fields)</entry>
-     </row>
-    </tbody>
-   </tgroup>
-  </table>
-  </para>
+  <xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) \
xpointer(id('mysqli-result.fetch-fields')/db:refsect1[@role='returnvalues']/db:table)">
 +   <xi:fallback/>
+  </xi:include>
  </refsect1>
 
  <refsect1 role="examples">
diff --git a/reference/mysqli/mysqli_result/fetch-fields.xml \
b/reference/mysqli/mysqli_result/fetch-fields.xml index a7f60c6cfc4b..fdbb1969f142 \
                100644
--- a/reference/mysqli/mysqli_result/fetch-fields.xml
+++ b/reference/mysqli/mysqli_result/fetch-fields.xml
@@ -42,8 +42,8 @@
   <para>
    Returns an array of objects containing field definition information.
   </para>
-  <para>
-  <table xml:id="mysqli-result.fetch-fields.returnvalues">
+
+  <table>
    <title>Object properties</title>
    <tgroup cols="2">
     <thead>
@@ -69,6 +69,18 @@
       <entry>orgtable</entry>
       <entry>Original table name if an alias was specified</entry>
      </row>
+     <row>
+      <entry>def</entry>
+      <entry>Unused. Always an empty string</entry>
+     </row>
+     <row>
+      <entry>db</entry>
+      <entry>The name of the database</entry>
+     </row>
+     <row>
+      <entry>catalog</entry>
+      <entry>Unused. Always <literal>"def"</literal></entry>
+     </row>
      <row>
       <entry>max_length</entry>
       <entry>The maximum width of the field for the result set. As of PHP 8.1, this \
value is always <literal>0</literal>.</entry> @@ -76,15 +88,17 @@
      <row>
       <entry>length</entry>
       <entry>
-       The width of the field, in bytes, as specified in the table definition. Note \
                that 
-       this number (bytes) might differ from your table definition value \
                (characters), depending on
-       the character set you use. For example, the character set utf8 has 3 bytes \
                per character, 
-       so varchar(10) will return a length of 30 for utf8 (10*3), but return 10 for \
latin1 (10*1). +       The width of the field in bytes. For string columns,
+       the length value varies on the connection character set. For example,
+       if the character set is <literal>latin1</literal>, a single-byte character \
set, +       the length value for a <literal>SELECT 'abc'</literal> query is 3.
+       If the character set is <literal>utf8mb4</literal>, a multibyte character
+       set in which characters take up to 4 bytes, the length value is 12.
       </entry>
      </row>
      <row>
       <entry>charsetnr</entry>
-      <entry>The character set number (id) for the field.</entry>
+      <entry>The character set number for the field.</entry>
      </row>
      <row>
       <entry>flags</entry>
@@ -96,12 +110,11 @@
      </row>
      <row>
       <entry>decimals</entry>
-      <entry>The number of decimals used (for integer fields)</entry>
+      <entry>The number of decimals for numeric fields, and the fractional seconds \
precision for temporal fields.</entry>  </row>
     </tbody>
    </tgroup>
   </table>
-  </para>
  </refsect1>
 
  <refsect1 role="examples">


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic