📄 mysqli-result.fetch-fields.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html> <head> <title>Returns an array of objects representing the fields in a result set</title> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> </head> <body><div style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="mysqli-result.fetch-field.html">mysqli_result::fetch_field</a></div> <div class="next" style="text-align: right; float: right;"><a href="mysqli-result.fetch-object.html">mysqli_result::fetch_object</a></div> <div class="up"><a href="class.mysqli-result.html">MySQLi_Result</a></div> <div class="home"><a href="index.html">PHP Manual</a></div></div><hr /><div id="mysqli-result.fetch-fields" class="refentry"> <div class="refnamediv"> <h1 class="refname">mysqli_result::fetch_fields</h1> <h1 class="refname">mysqli_fetch_fields</h1> <p class="verinfo">(PHP 5)</p><p class="refpurpose"><span class="refname">mysqli_result::fetch_fields</span> -- <span class="refname">mysqli_fetch_fields</span> — <span class="dc-title">Returns an array of objects representing the fields in a result set</span></p> </div> <div class="refsect1 description"> <h3 class="title">Description</h3> <p class="para">Object oriented style (method):</p> <div class="methodsynopsis dc-description"> <span class="type">array</span> <span class="methodname"><b><b>mysqli_result::fetch_fields</b></b></span> ( <span class="methodparam">void</span> )</div> <p class="para rdfs-comment">Procedural Style:</p> <div class="methodsynopsis dc-description"> <span class="type">array</span> <span class="methodname"><b><b>mysqli_fetch_fields</b></b></span> ( <span class="methodparam"><span class="type"><span class="type mysqli_result">mysqli_result</span></span> <tt class="parameter">$result</tt></span> )</div> <p class="para rdfs-comment"> This function serves an identical purpose to the <a href="mysqli-result.fetch-field.html" class="function">mysqli_fetch_field()</a> function with the single difference that, instead of returning one object at a time for each field, the columns are returned as an array of objects. </p> </div> <div class="refsect1 parameters"> <h3 class="title">Parameters</h3> <p class="para"> <dl> <dt><span class="term"><i><tt class="parameter">result</tt></i></span><dd><p class="para">Procedural style only: A result setidentifier returned by <a href="mysqli.query.html" class="function">mysqli_query()</a>, <a href="mysqli.store-result.html" class="function">mysqli_store_result()</a>or <a href="mysqli.use-result.html" class="function">mysqli_use_result()</a>.</p></dd></dt> </dl> </p> </div> <div class="refsect1 returnvalues"> <h3 class="title">Return Values</h3> <p class="para"> Returns an array of objects which contains field definition information or <b><tt>FALSE</tt></b> if no field information is available. </p> <p class="para"> <table border="5"> <caption><b>Object properties</b></caption> <colgroup> <thead valign="middle"> <tr valign="middle"> <th colspan="1">Property</th> <th colspan="1">Description</th> </tr> </thead> <tbody valign="middle" class="tbody"> <tr valign="middle"> <td colspan="1" rowspan="1" align="left">name</td> <td colspan="1" rowspan="1" align="left">The name of the column</td> </tr> <tr valign="middle"> <td colspan="1" rowspan="1" align="left">orgname</td> <td colspan="1" rowspan="1" align="left">Original column name if an alias was specified</td> </tr> <tr valign="middle"> <td colspan="1" rowspan="1" align="left">table</td> <td colspan="1" rowspan="1" align="left">The name of the table this field belongs to (if not calculated)</td> </tr> <tr valign="middle"> <td colspan="1" rowspan="1" align="left">orgtable</td> <td colspan="1" rowspan="1" align="left">Original table name if an alias was specified</td> </tr> <tr valign="middle">
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -