downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

Our source is open

The syntax highlighted source is automatically generated by PHP from the plaintext script. If you're interested in what's behind the several functions we used, you can always take a look at the source of the following files:

Of course, if you want to see the source of this page, we have it available. You can also browse the SVN repository for this website on svn.php.net.

Source of: /manual/en/function.odbc-fetch-into.php

<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = 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 => 'en',
  ),
 
'this' =>
  array (
   
0 => 'function.odbc-fetch-into.php',
   
1 => 'odbc_fetch_into',
  ),
 
'up' =>
  array (
   
0 => 'ref.uodbc.php',
   
1 => 'ODBC Functions',
  ),
 
'prev' =>
  array (
   
0 => 'function.odbc-fetch-array.php',
   
1 => 'odbc_fetch_array',
  ),
 
'next' =>
  array (
   
0 => 'function.odbc-fetch-object.php',
   
1 => 'odbc_fetch_object',
  ),
);
$setup["toc"] = $TOC;
$setup["parents"] = $PARENTS;
manual_setup($setup);

manual_header();
?>
<div id="function.odbc-fetch-into" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">odbc_fetch_into</h1>
  <p class="verinfo">(PHP 4, PHP 5)</p><p class="refpurpose"><span class="refname">odbc_fetch_into</span> &mdash; <span class="dc-title">Fetch one result row into array</span></p>

 </div>
 
 <a name="function.odbc-fetch-into.description"></a><div class="refsect1 description">
  <h3 class="title">Description</h3>
  <div class="methodsynopsis dc-description">
   <span class="type">int</span> <span class="methodname"><b>odbc_fetch_into</b></span>
    ( <span class="methodparam"><span class="type">resource</span> <tt class="parameter">$result_id</tt></span>
   , <span class="methodparam"><span class="type">array</span> <tt class="parameter reference">&amp;$result_array</tt></span>
   [, <span class="methodparam"><span class="type">int</span> <tt class="parameter">$rownumber</tt></span>
  ] )</div>

  <p class="para rdfs-comment">
   Fetch one result row into <a href="language.types.array.php" class="type array">array</a>.
  </p>
 </div>


 <a name="function.odbc-fetch-into.parameters"></a><div class="refsect1 parameters">
  <h3 class="title">Parameters</h3>
  <p class="para">
   </p><dl>

    <dt class="varlistentry">

     <span class="term"><i><tt class="parameter">result_id</tt></i>
</span>

     </dt><dd class="listitem">

      <p class="para">
       The result <a href="language.types.resource.php" class="type resource">resource</a>.
      </p>
     </dd>

   
    <dt class="varlistentry">

     <span class="term"><i><tt class="parameter">result_array</tt></i>
</span>

     </dt><dd class="listitem">

      <p class="para">
       The result <a href="language.types.array.php" class="type array">array</a>
       that can be of any type since it will be converted to type
       array. The array will contain the column values starting at array
       index 0.
      </p>
     </dd>

   
    <dt class="varlistentry">

     <span class="term"><i><tt class="parameter">rownumber</tt></i>
</span>

     </dt><dd class="listitem">

      <p class="para">
       The row number.
      </p>
     </dd>

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


 <a name="function.odbc-fetch-into.returnvalues"></a><div class="refsect1 returnvalues">
  <h3 class="title">Return Values</h3>
  <p class="para">
   Returns the number of columns in the result;
   <b><tt class="constant">FALSE</tt></b> on error.
  </p>
 </div>


 <a name="function.odbc-fetch-into.changelog"></a><div class="refsect1 changelog">
  <h3 class="title">Changelog</h3>
  <p class="para">
   </p><table class="doctable informaltable">
   
     <thead valign="middle">
      <tr valign="middle">
       <th>Version</th>
       <th>Description</th>
      </tr>

     </thead>

     <tbody valign="middle" class="tbody">
      <tr valign="middle">
       <td align="left">4.2.0</td>
       <td align="left">
        The <i><tt class="parameter">result_array</tt></i>
 and <i><tt class="parameter">rownumber</tt></i>

        parameters have been swapped. This allows the rownumber to be a constant again.
       </td>
      </tr>

      <tr valign="middle">
       <td align="left">4.0.6</td>
       <td align="left">
        The <i><tt class="parameter">rownumber</tt></i>
 can no longer be passed in as a
        constant, but rather as a variable. This again changed in 4.2.0.
       </td>
      </tr>

      <tr valign="middle">
       <td align="left">4.0.5</td>
       <td align="left">
        The <i><tt class="parameter">result_array</tt></i>
 parameter no longer needs to
        be passed in by reference.
       </td>
      </tr>

     </tbody>
   
   </table>
<p>
  </p>
 </div>


 <a name="function.odbc-fetch-into.examples"></a><div class="refsect1 examples">
  <h3 class="title">Examples</h3>
  <p class="para">
   </p><div class="example">
    <p><b>Example #1 <b>odbc_fetch_into()</b> examples</b></p>
    <div class="example-contents programlisting">
<div class="phpcode"><code><span style="color: #000000">
<span style="color: #0000BB">&lt;?php<br />$rc&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">odbc_fetch_into</span><span style="color: #007700">(</span><span style="color: #0000BB">$res_id</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">$my_array</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">?&gt;</span>
</span>
</code></div>
    </div>

    <div class="example-contents para"><p>
     or
    </p></div>
    <div class="example-contents programlisting">
<div class="phpcode"><code><span style="color: #000000">
<span style="color: #0000BB">&lt;?php<br />$rc&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">odbc_fetch_into</span><span style="color: #007700">(</span><span style="color: #0000BB">$res_id</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">$my_array</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">2</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">?&gt;</span>
</span>
</code></div>
    </div>

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

</div><?php manual_footer(); ?>
 
show source | credits | sitemap | contact | advertising | mirror sites