<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/ref.uodbc.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'de',
  ),
  'this' => 
  array (
    0 => 'function.odbc-result.php',
    1 => 'odbc_result',
    2 => 'Liefert Ergebnisdaten',
  ),
  'up' => 
  array (
    0 => 'ref.uodbc.php',
    1 => 'ODBC Funktionen',
  ),
  'prev' => 
  array (
    0 => 'function.odbc-procedures.php',
    1 => 'odbc_procedures',
  ),
  'next' => 
  array (
    0 => 'function.odbc-result-all.php',
    1 => 'odbc_result_all',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'de',
    'path' => 'reference/uodbc/functions/odbc-result.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.odbc-result" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">odbc_result</h1>
  <p class="verinfo">(PHP 4, PHP 5, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">odbc_result</span> &mdash; <span class="dc-title">Liefert Ergebnisdaten</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-function.odbc-result-description">
  <h3 class="title">Beschreibung</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>odbc_result</strong></span>(<span class="methodparam"><span class="type">Odbc\Result</span> <code class="parameter">$statement</code></span>, <span class="methodparam"><span class="type"><span class="type"><a href="language.types.string.php" class="type string">string</a></span>|<span class="type"><a href="language.types.integer.php" class="type int">int</a></span></span> <code class="parameter">$field</code></span>): <span class="type"><span class="type"><a href="language.types.string.php" class="type string">string</a></span>|<span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span>|<span class="type"><a href="language.types.null.php" class="type null">null</a></span></span></div>

  <p class="para rdfs-comment">
   Liefert Ergebnisdaten.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.odbc-result-parameters">
  <h3 class="title">Parameter-Liste</h3>
  <p class="para">
   <dl>
    
     <dt><code class="parameter">statement</code></dt>
     <dd>
      <p class="para">
       Das ODBC-Ergebnis-Objekt.
      </p>
     </dd>
    
    
     <dt><code class="parameter">field</code></dt>
     <dd>
      <p class="para">
       Der Name des zu lesenden Feldes. Dies kann entweder eine Ganzzahl sein,
       die der Spaltennummer des Feldes entspricht, oder eine Zeichenkette, die
       den Namen des Feldes enthält.
      </p>
     </dd>
    
   </dl>
  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.odbc-result-returnvalues">
  <h3 class="title">Rückgabewerte</h3>
  <p class="para">
   Gibt den Zeichenketteninhalt des Feldes zurück, <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> im Fehlerfall, <strong><code><a href="reserved.constants.php#constant.null">null</a></code></strong>
   bei NULL-Werten, oder <strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong> bei binären Daten.
  </p>
 </div>


 <div class="refsect1 changelog" id="refsect1-function.odbc-result-changelog">
  <h3 class="title">Changelog</h3>
  <p class="para">
   <table class="doctable informaltable">
    
     <thead>
      <tr>
       <th>Version</th>
       <th>Beschreibung</th>
      </tr>

     </thead>

     <tbody class="tbody">
      <tr>
 <td>8.4.0</td>
 <td>
  <code class="parameter">statement</code> erwartet nun eine Instanz von
  <span class="classname"><strong class="classname">Odbc\Result</strong></span>; vorher wurde eine
  <span class="type">Ressource</span> erwartet.
 </td>
</tr>

     </tbody>
    
   </table>

  </p>
 </div>


 <div class="refsect1 examples" id="refsect1-function.odbc-result-examples">
  <h3 class="title">Beispiele</h3>
  <p class="para">
   Der erste Aufruf von <span class="function"><strong>odbc_result()</strong></span> liefert den Wert des
   drittes Feldes im aktuellen Datensatz des Abfrageergebnisses zurück. Der
   zweite Funktionsaufruf von <span class="function"><strong>odbc_result()</strong></span> gibt den Wert der
   Spalte &quot;wert&quot; im aktuellen Datensatz zurück. Wenn die Spaltennummer kleiner
   als 1 oder größer als die Spaltenzahl ist, tritt ein Fehler auf. Gleiches
   gilt für einen Spaltennamen, der im Abfrageergebnis nicht vorkommt.
  </p>
  <p class="para">
   <div class="example" id="example-1">
    <p><strong>Beispiel #1 <span class="function"><strong>odbc_result()</strong></span>-Beispiele</strong></p>
    <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br />$item_3   </span><span style="color: #007700">= </span><span style="color: #0000BB">odbc_result</span><span style="color: #007700">(</span><span style="color: #0000BB">$Query_ID</span><span style="color: #007700">, </span><span style="color: #0000BB">3</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$item_val </span><span style="color: #007700">= </span><span style="color: #0000BB">odbc_result</span><span style="color: #007700">(</span><span style="color: #0000BB">$Query_ID</span><span style="color: #007700">, </span><span style="color: #DD0000">"wert"</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
    </div>

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


 <div class="refsect1 notes" id="refsect1-function.odbc-result-notes">
  <h3 class="title">Anmerkungen</h3>
  <p class="para">
   Feldindizes beginnen bei 1. Wie Binär- oder Long-Spaltendaten zurückgegeben
   werden, kann der <span class="function"><a href="function.odbc-binmode.php" class="function">odbc_binmode()</a></span>- und
   <span class="function"><a href="function.odbc-longreadlen.php" class="function">odbc_longreadlen()</a></span>-Dokumentation entnommen werden.
   
  </p>
 </div>


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