php-doc-en/reference/ingres-ii/functions/ingres-fetch-proc-return.xml

123 lines
3 KiB
XML
Raw Normal View History

<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xml:id="function.ingres-fetch-proc-return" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>ingres_fetch_proc_return</refname>
<refpurpose>Get the return value from a procedure call</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>int</type><methodname>ingres_fetch_proc_return</methodname>
<methodparam><type>resource</type><parameter>result</parameter></methodparam>
</methodsynopsis>
<para>
This function is used to retrieve the return value following the execution
of an Ingres database procedure (stored procedure).
</para>
<note>
<para>
If used with a row-producing procedure, this function should be called after all the
rows from the procedure have been fetched using
<function>ingres_fetch_array</function>,
<function>ingres_fetch_object</function> or
<function>ingres_fetch_row</function>. This function will eliminate any
rows yet to be fetched should there be any left over.
</para>
</note>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>result</parameter></term>
<listitem>
<para>
The result identifier for a query
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Returns an <type>integer</type> if there is a return value otherwise it will
return &null;.
</para>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title>Get the return value from a procedure call</title>
<programlisting role="php">
<![CDATA[
<?php
$link = ingres_connect($database);
if ( ingres_errno() != 0 ) {
$error_text = ingres_error();
die($error_text);
}
$result = ingres_query($link, "execute procedure php_proc (value = 1000)");
if ( ingres_errno() != 0 ) {
$error_text = ingres_error();
die($error_text);
}
echo "return value - " . ingres_fetch_proc_return($result) . "\n";
ingres_close($link);
?>
]]>
</programlisting>
</example>
</para>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><function>ingres_query</function></member>
<member><function>ingres_fetch_array</function></member>
<member><function>ingres_fetch_object</function></member>
<member><function>ingres_fetch_row</function></member>
</simplelist>
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->