mirror of
https://github.com/php/doc-ru.git
synced 2025-08-16 18:22:04 +00:00
129 lines
3.8 KiB
XML
129 lines
3.8 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
||
<!-- EN-Revision: 5e41012cfdf8f2eff5fa56de446c7656afac536c Maintainer: aur Status: ready -->
|
||
<!-- Reviewed: no -->
|
||
<refentry xml:id="function.oci-result" xmlns="http://docbook.org/ns/docbook">
|
||
<refnamediv>
|
||
<refname>oci_result</refname>
|
||
<refpurpose>Возвращает значение поля из результата запроса</refpurpose>
|
||
</refnamediv>
|
||
|
||
<refsect1 role="description">
|
||
&reftitle.description;
|
||
<methodsynopsis>
|
||
<type>mixed</type><methodname>oci_result</methodname>
|
||
<methodparam><type>resource</type><parameter>statement</parameter></methodparam>
|
||
<methodparam><type class="union"><type>string</type><type>int</type></type><parameter>column</parameter></methodparam>
|
||
</methodsynopsis>
|
||
<para>
|
||
Возвращает данные поля <parameter>column</parameter> текущей строки, возвращаемой
|
||
функцией <function>oci_fetch</function>.
|
||
</para>
|
||
&oci.datatypes;
|
||
</refsect1>
|
||
|
||
<refsect1 role="parameters">
|
||
&reftitle.parameters;
|
||
<para>
|
||
<variablelist>
|
||
<varlistentry>
|
||
<term><parameter>statement</parameter></term>
|
||
<listitem>
|
||
<para>
|
||
</para>
|
||
</listitem>
|
||
</varlistentry>
|
||
<varlistentry>
|
||
<term><parameter>column</parameter></term>
|
||
<listitem>
|
||
<para>
|
||
Может быть задано номером поля (начиная с 1), либо по имени.
|
||
Регистр имени поля должен быть таким же, как и у поля, описанного в метаданных Oracle,
|
||
которое всегда в верхнем регистре для полей, созданных регистронезависимыми.
|
||
</para>
|
||
</listitem>
|
||
</varlistentry>
|
||
</variablelist>
|
||
</para>
|
||
</refsect1>
|
||
|
||
<refsect1 role="returnvalues">
|
||
&reftitle.returnvalues;
|
||
<para>
|
||
Возвращает все значения в виде строки за исключением абстрактных типов
|
||
(ROWIDs, LOBs и FILEs). Возвращает &false; в случае возникновения ошибки.
|
||
</para>
|
||
</refsect1>
|
||
|
||
<refsect1 role="examples">
|
||
&reftitle.examples;
|
||
<para>
|
||
<example>
|
||
<title>Пример использования <function>oci_fetch</function> с <function>oci_result</function></title>
|
||
<programlisting role="php">
|
||
<![CDATA[
|
||
<?php
|
||
|
||
$conn = oci_connect('hr', 'welcome', 'localhost/XE');
|
||
if (!$conn) {
|
||
$e = oci_error();
|
||
trigger_error(htmlentities($e['message'], ENT_QUOTES), E_USER_ERROR);
|
||
}
|
||
|
||
$sql = 'SELECT location_id, city FROM locations WHERE location_id < 1200';
|
||
$stid = oci_parse($conn, $sql);
|
||
oci_execute($stid);
|
||
|
||
while (oci_fetch($stid)) {
|
||
echo oci_result($stid, 'LOCATION_ID') . " - это ";
|
||
echo oci_result($stid, 'CITY') . "<br>\n";
|
||
}
|
||
|
||
// Выведет:
|
||
// 1000 - это Roma
|
||
// 1100 - это Venice
|
||
|
||
oci_free_statement($stid);
|
||
oci_close($conn);
|
||
|
||
?>
|
||
]]>
|
||
</programlisting>
|
||
</example>
|
||
</para>
|
||
</refsect1>
|
||
|
||
<refsect1 role="seealso">
|
||
&reftitle.seealso;
|
||
<para>
|
||
<simplelist>
|
||
<member><function>oci_fetch_array</function></member>
|
||
<member><function>oci_fetch_assoc</function></member>
|
||
<member><function>oci_fetch_object</function></member>
|
||
<member><function>oci_fetch_row</function></member>
|
||
<member><function>oci_fetch_all</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
|
||
-->
|