php-doc-en/reference/oci8/functions/ocifetchinto.xml
Mehdi Achour 5984003d05 correcting protos
adding two undocumented functions
stripping useless HTML tags from examples
correcting typos
integrating some notes


git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@137469 c90b9560-bf6c-de11-be94-00142212c4b1
2003-08-12 08:56:59 +00:00

94 lines
2.8 KiB
XML

<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.7 $ -->
<!-- splitted from ./en/functions/oci8.xml, last change in rev 1.2 -->
<refentry id="function.ocifetchinto">
<refnamediv>
<refname>ocifetchinto</refname>
<refpurpose>Fetches the next row into an array</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>int</type><methodname>ocifetchinto</methodname>
<methodparam><type>resource</type><parameter>stmt</parameter></methodparam>
<methodparam><type>array</type><parameter>&amp;result</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>mode</parameter></methodparam>
</methodsynopsis>
<para>
<function>ocifetchinto</function> fetches the next row (for SELECT
statements) into the <parameter>result</parameter> array.
<function>ocifetchinto</function> will overwrite the previous
content of <parameter>result</parameter>. By default
<parameter>result</parameter> will contain a zero-based array of all
columns that are not &null;.
</para>
<para>
The <parameter>mode</parameter> parameter allows you to change the
default behaviour. You can specify more than one flag by simply
adding them up (eg OCI_ASSOC+OCI_RETURN_NULLS). The known flags
are:
<simplelist>
<member>
<constant>OCI_ASSOC</constant> Return an associative array.
</member>
<member>
<constant>OCI_NUM</constant> Return an numbered array starting with
zero. (DEFAULT)
</member>
<member>
<constant>OCI_RETURN_NULLS</constant> Return empty columns.
</member>
<member>
<constant>OCI_RETURN_LOBS</constant> Return the value of a LOB
instead of the descriptor.
</member>
</simplelist>
</para>
<para>
<example>
<title>A simple <function>ocifetchinto</function> example</title>
<programlisting role="php">
<![CDATA[
<?php
$conn = ocilogon("username","password");
$query = "SELECT apples FROM oranges";
$statement = OCIParse ($conn, $query);
OCIExecute ($statement);
while (OCIFetchInto ($statement, $row, OCI_ASSOC)) {
print $row['apples'];
}
?>
]]>
</programlisting>
</example>
</para>
<para>
See also <function>ocifetch</function> and
<function>ociexecute</function>.
</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:"../../../../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
-->