Sophie

Sophie

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

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 the return value from a procedure call</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="function.ingres-fetch-object.html">ingres_fetch_object</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="function.ingres-fetch-row.html">ingres_fetch_row</a></div>
 <div class="up"><a href="ref.ingres.html">Ingres Functions</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="function.ingres-fetch-proc-return" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">ingres_fetch_proc_return</h1>
  <p class="verinfo">(PECL ingres &gt;= 1.4.0)</p><p class="refpurpose"><span class="refname">ingres_fetch_proc_return</span> &mdash; <span class="dc-title">Get the return value from a procedure call</span></p>

 </div>
 
 <div class="refsect1 description" id="refsect1-function.ingres-fetch-proc-return-description">
  <h3 class="title">Description</h3>
  <div class="methodsynopsis dc-description">
   <span class="type">int</span> <span class="methodname"><strong>ingres_fetch_proc_return</strong></span>
    ( <span class="methodparam"><span class="type">resource</span> <code class="parameter">$result</code></span>
   )</div>

  <p class="para rdfs-comment">
   This function is used to retrieve the return value following the execution
   of an Ingres database procedure (stored procedure). 
  </p>
  <blockquote class="note"><p><strong class="note">Note</strong>: 
   <p class="para">
    If used with a row-producing procedure, this function should be called after all the
    rows from the procedure have been fetched using
     <span class="function"><a href="function.ingres-fetch-array.html" class="function">ingres_fetch_array()</a></span>,
     <span class="function"><a href="function.ingres-fetch-object.html" class="function">ingres_fetch_object()</a></span> or
     <span class="function"><a href="function.ingres-fetch-row.html" class="function">ingres_fetch_row()</a></span>. This function will eliminate any
    rows yet to be fetched should there be any left over.
   </p>
  </p></blockquote>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.ingres-fetch-proc-return-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">
       The result identifier for a query
      </p>
     </dd>

    </dt>

   </dl>

  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.ingres-fetch-proc-return-returnvalues">
  <h3 class="title">Return Values</h3>
  <p class="para">
   Returns an <span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span> if there is a return value otherwise it will
   return <strong><code>NULL</code></strong>.
  </p>
 </div>


 <div class="refsect1 examples" id="refsect1-function.ingres-fetch-proc-return-examples">
  <h3 class="title">Examples</h3>
  <p class="para">
   <div class="example" id="example-1217">
    <p><strong>Example #1 Get the return value from a procedure call</strong></p>
    <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000">
<span style="color: #0000BB">&lt;?php<br /><br />$link&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">ingres_connect</span><span style="color: #007700">(</span><span style="color: #0000BB">$database</span><span style="color: #007700">);<br /><br />if&nbsp;(&nbsp;</span><span style="color: #0000BB">ingres_errno</span><span style="color: #007700">()&nbsp;!=&nbsp;</span><span style="color: #0000BB">0&nbsp;</span><span style="color: #007700">)&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">$error_text&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">ingres_error</span><span style="color: #007700">();<br />&nbsp;&nbsp;&nbsp;&nbsp;die(</span><span style="color: #0000BB">$error_text</span><span style="color: #007700">);<br />}<br /><br /></span><span style="color: #0000BB">$result&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">ingres_query</span><span style="color: #007700">(</span><span style="color: #0000BB">$link</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"execute&nbsp;procedure&nbsp;php_proc&nbsp;(value&nbsp;=&nbsp;1000)"</span><span style="color: #007700">);<br /><br />if&nbsp;(&nbsp;</span><span style="color: #0000BB">ingres_errno</span><span style="color: #007700">()&nbsp;!=&nbsp;</span><span style="color: #0000BB">0&nbsp;</span><span style="color: #007700">)&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">$error_text&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">ingres_error</span><span style="color: #007700">();<br />&nbsp;&nbsp;&nbsp;&nbsp;die(</span><span style="color: #0000BB">$error_text</span><span style="color: #007700">);<br />}<br /><br />echo&nbsp;</span><span style="color: #DD0000">"return&nbsp;value&nbsp;-&nbsp;"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">ingres_fetch_proc_return</span><span style="color: #007700">(</span><span style="color: #0000BB">$result</span><span style="color: #007700">)&nbsp;.&nbsp;</span><span style="color: #DD0000">"\n"</span><span style="color: #007700">;<br /><br /></span><span style="color: #0000BB">ingres_close</span><span style="color: #007700">(</span><span style="color: #0000BB">$link</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB">?&gt;</span>
</span>
</code></div>
    </div>

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

 
 <div class="refsect1 seealso" id="refsect1-function.ingres-fetch-proc-return-seealso">
  <h3 class="title">See Also</h3>
  <p class="para">
   <ul class="simplelist">
    <li class="member"> <span class="function"><a href="function.ingres-query.html" class="function" rel="rdfs-seeAlso">ingres_query()</a> - Send an SQL query to Ingres</span></li>
    <li class="member"> <span class="function"><a href="function.ingres-fetch-array.html" class="function" rel="rdfs-seeAlso">ingres_fetch_array()</a> - Fetch a row of result into an array</span></li>
    <li class="member"> <span class="function"><a href="function.ingres-fetch-object.html" class="function" rel="rdfs-seeAlso">ingres_fetch_object()</a> - Fetch a row of result into an object</span></li>
    <li class="member"> <span class="function"><a href="function.ingres-fetch-row.html" class="function" rel="rdfs-seeAlso">ingres_fetch_row()</a> - Fetch a row of result into an enumerated array</span></li>
   </ul>
  </p>
 </div>


</div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="function.ingres-fetch-object.html">ingres_fetch_object</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="function.ingres-fetch-row.html">ingres_fetch_row</a></div>
 <div class="up"><a href="ref.ingres.html">Ingres Functions</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>