Sophie

Sophie

distrib > Mageia > 4 > x86_64 > by-pkgid > f800694edefe91adea2624f711a41a2d > files > 4938

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>Retrieves a list of foreign keys</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="function.odbc-field-type.html">odbc_field_type</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="function.odbc-free-result.html">odbc_free_result</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-foreignkeys" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">odbc_foreignkeys</h1>
  <p class="verinfo">(PHP 4, PHP 5)</p><p class="refpurpose"><span class="refname">odbc_foreignkeys</span> &mdash; <span class="dc-title">Retrieves a list of foreign keys</span></p>

 </div>
 
 <div class="refsect1 description" id="refsect1-function.odbc-foreignkeys-description">
  <h3 class="title">Description</h3>
  <div class="methodsynopsis dc-description">
   <span class="type">resource</span> <span class="methodname"><strong>odbc_foreignkeys</strong></span>
    ( <span class="methodparam"><span class="type">resource</span> <code class="parameter">$connection_id</code></span>
   , <span class="methodparam"><span class="type">string</span> <code class="parameter">$pk_qualifier</code></span>
   , <span class="methodparam"><span class="type">string</span> <code class="parameter">$pk_owner</code></span>
   , <span class="methodparam"><span class="type">string</span> <code class="parameter">$pk_table</code></span>
   , <span class="methodparam"><span class="type">string</span> <code class="parameter">$fk_qualifier</code></span>
   , <span class="methodparam"><span class="type">string</span> <code class="parameter">$fk_owner</code></span>
   , <span class="methodparam"><span class="type">string</span> <code class="parameter">$fk_table</code></span>
   )</div>

  <p class="para rdfs-comment">
   Retrieves a list of foreign keys in the specified table or a list of
   foreign keys in other tables that refer to the primary key in the
   specified table
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.odbc-foreignkeys-parameters">
  <h3 class="title">Parameters</h3>
  <p class="para">
   <dl>

    <dt>

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

      <p class="para">The ODBC connection identifier,
see  <span class="function"><a href="function.odbc-connect.html" class="function">odbc_connect()</a></span> for details.</p>
     </dd>

    </dt>

    <dt>

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

      <p class="para">
       The primary key qualifier.
      </p>
     </dd>

    </dt>

    <dt>

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

      <p class="para">
       The primary key owner.
      </p>
     </dd>

    </dt>

    <dt>

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

      <p class="para">
       The primary key table.
      </p>
     </dd>

    </dt>

    <dt>

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

      <p class="para">
       The foreign key qualifier.
      </p>
     </dd>

    </dt>

    <dt>

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

      <p class="para">
       The foreign key owner.
      </p>
     </dd>

    </dt>

    <dt>

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

      <p class="para">
       The foreign key table.
      </p>
     </dd>

    </dt>

   </dl>

  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.odbc-foreignkeys-returnvalues">
  <h3 class="title">Return Values</h3>
  <p class="para">
   Returns an ODBC result identifier or <strong><code>FALSE</code></strong> on failure.
  </p>
  <p class="para">
   The result set has the following columns:
   <ul class="itemizedlist">
    <li class="listitem"><span class="simpara">PKTABLE_QUALIFIER</span></li>
    <li class="listitem"><span class="simpara">PKTABLE_OWNER</span></li>
    <li class="listitem"><span class="simpara">PKTABLE_NAME</span></li>
    <li class="listitem"><span class="simpara">PKCOLUMN_NAME</span></li>
    <li class="listitem"><span class="simpara">FKTABLE_QUALIFIER</span></li>
    <li class="listitem"><span class="simpara">FKTABLE_OWNER</span></li>
    <li class="listitem"><span class="simpara">FKTABLE_NAME</span></li>
    <li class="listitem"><span class="simpara">FKCOLUMN_NAME</span></li>
    <li class="listitem"><span class="simpara">KEY_SEQ</span></li>
    <li class="listitem"><span class="simpara">UPDATE_RULE</span></li>
    <li class="listitem"><span class="simpara">DELETE_RULE</span></li>
    <li class="listitem"><span class="simpara">FK_NAME</span></li>
    <li class="listitem"><span class="simpara">PK_NAME</span></li>
   </ul>
  </p>
  <p class="simpara">
   If <em><code class="parameter">pk_table</code></em> contains a table name,
    <span class="function"><strong>odbc_foreignkeys()</strong></span> returns a result set
   containing the primary key of the specified table and all of the
   foreign keys that refer to it.
  </p>
  <p class="simpara">
   If <em><code class="parameter">fk_table</code></em> contains a table name,
    <span class="function"><strong>odbc_foreignkeys()</strong></span> returns a result set
   containing all of the foreign keys in the specified table and the
   primary keys (in other tables) to which they refer.
  </p>
  <p class="simpara">
   If both <em><code class="parameter">pk_table</code></em> and
   <em><code class="parameter">fk_table</code></em> contain table names,
    <span class="function"><strong>odbc_foreignkeys()</strong></span> returns the foreign keys in
   the table specified in <em><code class="parameter">fk_table</code></em> that refer
   to the primary key of the table specified in
   <em><code class="parameter">pk_table</code></em>. This should be one key at most.
  </p>
 </div>


</div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="function.odbc-field-type.html">odbc_field_type</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="function.odbc-free-result.html">odbc_free_result</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>