<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/ref.ibm-db2.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'tr',
  ),
  'this' => 
  array (
    0 => 'function.db2-result.php',
    1 => 'db2_result',
    2 => 'Returns a single column from a row in the result set',
  ),
  'up' => 
  array (
    0 => 'ref.ibm-db2.php',
    1 => 'IBM DB2 İşlevleri',
  ),
  'prev' => 
  array (
    0 => 'function.db2-procedures.php',
    1 => 'db2_procedures',
  ),
  'next' => 
  array (
    0 => 'function.db2-rollback.php',
    1 => 'db2_rollback',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/ibm_db2/functions/db2-result.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.db2-result" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">db2_result</h1>
  <p class="verinfo">(PECL ibm_db2 &gt;= 1.0.0)</p><p class="refpurpose"><span class="refname">db2_result</span> &mdash; <span class="dc-title">
   Returns a single column from a row in the result set
  </span></p>

 </div>
 <div class="refsect1 description" id="refsect1-function.db2-result-description">
  <h3 class="title">Açıklama</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>db2_result</strong></span>(<span class="methodparam"><span class="type"><a href="language.types.resource.php" class="type resource">resource</a></span> <code class="parameter">$stmt</code></span>, <span class="methodparam"><span class="type"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span>|<span class="type"><a href="language.types.string.php" class="type string">string</a></span></span> <code class="parameter">$column</code></span>): <span class="type"><span class="type"><a href="language.types.null.php" class="type null">?</a></span><span class="type"><a href="language.types.mixed.php" class="type mixed">mixed</a></span></span></div>



  <p class="simpara">
   Use <span class="function"><strong>db2_result()</strong></span> to return the value of a specified
   column in the current row of a result set. You must call
   <span class="function"><a href="function.db2-fetch-row.php" class="function">db2_fetch_row()</a></span> before calling
   <span class="function"><strong>db2_result()</strong></span> to set the location of the result set
   pointer.
  </p>

 </div>

 <div class="refsect1 parameters" id="refsect1-function.db2-result-parameters">
  <h3 class="title">Bağımsız Değişkenler</h3>
  <dl>
   
    <dt><code class="parameter">stmt</code></dt>
     <dd>
      <span class="simpara">
       A valid <code class="literal">stmt</code> resource.
      </span>
     </dd>
    
   
    <dt><code class="parameter">column</code></dt>
     <dd>
      <span class="simpara">
       Either an integer mapping to the 0-indexed field in the result set, or
       a string matching the name of the column.
      </span>
     </dd>
    
  </dl>
 </div>

 <div class="refsect1 returnvalues" id="refsect1-function.db2-result-returnvalues">
  <h3 class="title">Dönen Değerler</h3>
  <p class="simpara">
   Returns the value of the requested field if the field exists in the result
   set. Returns <strong><code><a href="reserved.constants.php#constant.null">null</a></code></strong> if the field does not exist, and issues a warning.
  </p>
 </div>


 <div class="refsect1 examples" id="refsect1-function.db2-result-examples">
  <h3 class="title">Örnekler</h3>
  <div class="example" id="example-1">
   <p><strong>Örnek 1 A <span class="function"><strong>db2_result()</strong></span> example</strong></p>
   <div class="example-contents"><p>
    The following example demonstrates how to iterate through a result set
    with <span class="function"><a href="function.db2-fetch-row.php" class="function">db2_fetch_row()</a></span> and retrieve columns from the
    result set with <span class="function"><strong>db2_result()</strong></span>.
   </p></div>
   <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br />$sql </span><span style="color: #007700">= </span><span style="color: #DD0000">'SELECT name, breed FROM animals WHERE weight &lt; ?'</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">$stmt </span><span style="color: #007700">= </span><span style="color: #0000BB">db2_prepare</span><span style="color: #007700">(</span><span style="color: #0000BB">$conn</span><span style="color: #007700">, </span><span style="color: #0000BB">$sql</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">db2_execute</span><span style="color: #007700">(</span><span style="color: #0000BB">$stmt</span><span style="color: #007700">, array(</span><span style="color: #0000BB">10</span><span style="color: #007700">));<br />while (</span><span style="color: #0000BB">db2_fetch_row</span><span style="color: #007700">(</span><span style="color: #0000BB">$stmt</span><span style="color: #007700">)) {<br />    </span><span style="color: #0000BB">$name </span><span style="color: #007700">= </span><span style="color: #0000BB">db2_result</span><span style="color: #007700">(</span><span style="color: #0000BB">$stmt</span><span style="color: #007700">, </span><span style="color: #0000BB">0</span><span style="color: #007700">);<br />    </span><span style="color: #0000BB">$breed </span><span style="color: #007700">= </span><span style="color: #0000BB">db2_result</span><span style="color: #007700">(</span><span style="color: #0000BB">$stmt</span><span style="color: #007700">, </span><span style="color: #DD0000">'BREED'</span><span style="color: #007700">);<br />    print </span><span style="color: #DD0000">"</span><span style="color: #0000BB">$name</span><span style="color: #DD0000"> </span><span style="color: #0000BB">$breed</span><span style="color: #DD0000">"</span><span style="color: #007700">;<br />}<br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
   </div>

   <div class="example-contents"><p>
Yukarıdaki örneğin çıktısı:</p></div>
   <div class="example-contents screen">
<div class="examplescode"><pre class="examplescode">cat Pook
gold fish Bubbles
budgerigar Gizmo
goat Rickety Ride</pre>
</div>
   </div>
  </div>
 </div>


 <div class="refsect1 seealso" id="refsect1-function.db2-result-seealso">
  <h3 class="title">Ayrıca Bakınız</h3>
  <ul class="simplelist">
   <li><span class="function"><a href="function.db2-fetch-array.php" class="function" rel="rdfs-seeAlso">db2_fetch_array()</a> - Returns an array, indexed by column position, representing a row in a result set</span></li>
   <li><span class="function"><a href="function.db2-fetch-assoc.php" class="function" rel="rdfs-seeAlso">db2_fetch_assoc()</a> - Returns an array, indexed by column name, representing a row in a result set</span></li>
   <li><span class="function"><a href="function.db2-fetch-both.php" class="function" rel="rdfs-seeAlso">db2_fetch_both()</a> - Returns an array, indexed by both column name and position, representing a row in a result set</span></li>
   <li><span class="function"><a href="function.db2-fetch-object.php" class="function" rel="rdfs-seeAlso">db2_fetch_object()</a> - Returns an object with properties representing columns in the fetched row</span></li>
   <li><span class="function"><a href="function.db2-fetch-row.php" class="function" rel="rdfs-seeAlso">db2_fetch_row()</a> - Sets the result set pointer to the next row or requested row</span></li>
  </ul>
 </div>


</div><?php manual_footer($setup); ?>