⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 function.odbc-result.html

📁 php的帮助文档,涉及到PHP的案例和基本语法,以及实际应用内容
💻 HTML
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html> <head>  <title>Get result data</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="function.odbc-result-all.html">odbc_result_all</a></div> <div class="next" style="text-align: right; float: right;"><a href="function.odbc-rollback.html">odbc_rollback</a></div> <div class="up"><a href="ref.uodbc.html">ODBC Functions</a></div> <div class="home"><a href="index.html">PHP Manual</a></div></div><hr /><div id="function.odbc-result" class="refentry"> <div class="refnamediv">  <h1 class="refname">odbc_result</h1>  <p class="verinfo">(PHP 4, PHP 5)</p><p class="refpurpose"><span class="refname">odbc_result</span> &mdash; <span class="dc-title">Get result data</span></p> </div>  <div class="refsect1 description">  <h3 class="title">Description</h3>  <div class="methodsynopsis dc-description">   <span class="type"><a href="language.pseudo-types.html#language.types.mixed" class="type mixed">mixed</a></span> <span class="methodname"><b><b>odbc_result</b></b></span>    ( <span class="methodparam"><span class="type">resource</span> <tt class="parameter">$result_id</tt></span>   , <span class="methodparam"><span class="type"><a href="language.pseudo-types.html#language.types.mixed" class="type mixed">mixed</a></span> <tt class="parameter">$field</tt></span>   )</div>  <p class="para rdfs-comment">   Get result data  </p> </div> <div class="refsect1 parameters">  <h3 class="title">Parameters</h3>  <p class="para">   <dl>    <dt>     <span class="term"><i><tt class="parameter">result_id</tt></i></span>     <dd>      <p class="para">       The ODBC <a href="language.types.resource.html" class="type resource">resource</a>.      </p>     </dd>    </dt>    <dt>     <span class="term"><i><tt class="parameter">field</tt></i></span>     <dd>      <p class="para">       The field name being retrieved. It can either be an integer containing       the column number of the field you want; or it can be a string       containing the name of the field.      </p>     </dd>    </dt>   </dl>  </p> </div> <div class="refsect1 returnvalues">  <h3 class="title">Return Values</h3>  <p class="para">   Returns the string contents of the field, <b><tt>FALSE</tt></b> on error, <b><tt>NULL</tt></b> for   NULL data, or <b><tt>TRUE</tt></b> for binary data.  </p> </div> <div class="refsect1 examples">  <h3 class="title">Examples</h3>  <p class="para">   The first call to <b>odbc_result()</b> returns the   value of the third field in the current record of the query   result. The second function call to   <b>odbc_result()</b> returns the value of the field   whose field name is &quot;val&quot; in the current record of the query   result. An error occurs if a column number parameter for a field   is less than one or exceeds the number of columns (or fields) in   the current record. Similarly, an error occurs if a field with a   name that is not one of the fieldnames of the table(s) that   is(are) being queried.  </p>  <p class="para">   <div class="example">    <p><b>Example #1 <b>odbc_result()</b> examples</b></p>    <div class="example-contents"><div class="phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br />$item_3&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">odbc_result</span><span style="color: #007700">(</span><span style="color: #0000BB">$Query_ID</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">3</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$item_val&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">odbc_result</span><span style="color: #007700">(</span><span style="color: #0000BB">$Query_ID</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"val"</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>    </div>   </div>  </p> </div> <div class="refsect1 notes">  <h3 class="title">Notes</h3>  <p class="para">   Field indices start from 1. Regarding the way binary or   long column data is returned refer to   <a href="function.odbc-binmode.html" class="function">odbc_binmode()</a> and   <a href="function.odbc-longreadlen.html" class="function">odbc_longreadlen()</a>.     </p> </div></div><hr /><div style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="function.odbc-result-all.html">odbc_result_all</a></div> <div class="next" style="text-align: right; float: right;"><a href="function.odbc-rollback.html">odbc_rollback</a></div> <div class="up"><a href="ref.uodbc.html">ODBC Functions</a></div> <div class="home"><a href="index.html">PHP Manual</a></div></div></body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -