Sophie

Sophie

distrib > Mageia > 4 > i586 > by-pkgid > f800694edefe91adea2624f711a41a2d > files > 3013

php-manual-en-5.5.7-1.mga4.noarch.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Get table name of field</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="function.fbsql-stop-db.html">fbsql_stop_db</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="function.fbsql-tablename.html">fbsql_tablename</a></div>
 <div class="up"><a href="ref.fbsql.html">FrontBase Functions</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="function.fbsql-table-name" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">fbsql_table_name</h1>
  <p class="verinfo">(PHP 4 &gt;= 4.2.0, PHP 5)</p><p class="refpurpose"><span class="refname">fbsql_table_name</span> &mdash; <span class="dc-title">Get table name of field</span></p>

 </div>
 
 <div class="refsect1 description" id="refsect1-function.fbsql-table-name-description">
  <h3 class="title">Description</h3>
  <div class="methodsynopsis dc-description">
   <span class="type">string</span> <span class="methodname"><strong>fbsql_table_name</strong></span>
    ( <span class="methodparam"><span class="type">resource</span> <code class="parameter">$result</code></span>
   , <span class="methodparam"><span class="type">int</span> <code class="parameter">$index</code></span>
   )</div>

  <p class="para rdfs-comment">
    <span class="function"><strong>fbsql_table_name()</strong></span> gets the name of the current table in
   the given <em><code class="parameter">result</code></em> set.
  </p>
  <p class="para">
   The  <span class="function"><a href="function.fbsql-num-rows.html" class="function">fbsql_num_rows()</a></span> function may be used to determine
   the number of tables in the result pointer.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.fbsql-table-name-parameters">
  <h3 class="title">Parameters</h3>
  <p class="para">
   <dl>

    <dt>

     <span class="term"><em><code class="parameter">result</code></em></span>
     <dd>

      <p class="para">
       A result pointer returned by  <span class="function"><a href="function.fbsql-list-tables.html" class="function">fbsql_list_tables()</a></span>.
      </p>
     </dd>

    </dt>

    <dt>

     <span class="term"><em><code class="parameter">index</code></em></span>
     <dd>

      <p class="para">
       Integer index for the current table.
      </p>
     </dd>

    </dt>

   </dl>

  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.fbsql-table-name-returnvalues">
  <h3 class="title">Return Values</h3>
  <p class="para">
   Returns the name of the table, as a string.
  </p>
 </div>


 <div class="refsect1 examples" id="refsect1-function.fbsql-table-name-examples">
  <h3 class="title">Examples</h3>
  <p class="para">
   <div class="example" id="example-1137">
    <p><strong>Example #1  <span class="function"><strong>fbsql_table_name()</strong></span> example</strong></p>
    <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000">
<span style="color: #0000BB">&lt;?php<br />fbsql_connect</span><span style="color: #007700">(</span><span style="color: #DD0000">"localhost"</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"_SYSTEM"</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">""</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$result&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">fbsql_list_tables</span><span style="color: #007700">(</span><span style="color: #DD0000">"wisconsin"</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$i&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">0</span><span style="color: #007700">;<br />while&nbsp;(</span><span style="color: #0000BB">$i&nbsp;</span><span style="color: #007700">&lt;&nbsp;</span><span style="color: #0000BB">fbsql_num_rows</span><span style="color: #007700">(</span><span style="color: #0000BB">$result</span><span style="color: #007700">))&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">$tb_names</span><span style="color: #007700">[</span><span style="color: #0000BB">$i</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #0000BB">fbsql_table_name</span><span style="color: #007700">(</span><span style="color: #0000BB">$result</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">$i</span><span style="color: #007700">);<br />&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;</span><span style="color: #0000BB">$tb_names</span><span style="color: #007700">[</span><span style="color: #0000BB">$i</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">"&lt;br&nbsp;/&gt;"</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">$i</span><span style="color: #007700">++;<br />}<br /></span><span style="color: #0000BB">?&gt;</span>
</span>
</code></div>
    </div>

   </div>
  </p>
 </div>


</div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="function.fbsql-stop-db.html">fbsql_stop_db</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="function.fbsql-tablename.html">fbsql_tablename</a></div>
 <div class="up"><a href="ref.fbsql.html">FrontBase Functions</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>