svn: /phpdoc/ru/trunk/reference/mysql/functions/ mysql-field-type.xml
| From: | Shein Alexey | Date: | Tue, 31 May 2011 12:04:56 +0000 |
| Subject: | svn: /phpdoc/ru/trunk/reference/mysql/functions/ mysql-field-type.xml | ||
| Groups: | php.doc.ru | ||
| Request: | Send a blank email to doc-ru+get-1838@lists.php.net to get a copy of this message | ||
shein Tue, 31 May 2011 12:04:56 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=311661
Log:
Updated translation.
Changed paths:
U phpdoc/ru/trunk/reference/mysql/functions/mysql-field-type.xml
Modified: phpdoc/ru/trunk/reference/mysql/functions/mysql-field-type.xml
===================================================================
--- phpdoc/ru/trunk/reference/mysql/functions/mysql-field-type.xml 2011-05-31 12:00:33 UTC (rev
311660)
+++ phpdoc/ru/trunk/reference/mysql/functions/mysql-field-type.xml 2011-05-31 12:04:56 UTC (rev
311661)
@@ -1,75 +1,112 @@
<?xml version="1.0" encoding="utf-8"?>
+<!-- EN-Revision: 297028 Maintainer: shein Status: ready -->
+<!-- Reviewed: no -->
<!-- $Revision$ -->
-<!-- EN-Revision: n/a Maintainer: lovchy Status: ready -->
-<!-- splitted from ./en/functions/mysql.xml, last change in rev 1.2 -->
- <refentry xml:id="function.mysql-field-type" xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink">
- <refnamediv>
- <refname>mysql_field_type</refname>
- <refpurpose>
- Возвращает тип указанного поля результата запроса.
- </refpurpose>
- </refnamediv>
- <refsect1>
- <title>Описание</title>
- <methodsynopsis>
- <type>string</type><methodname>mysql_field_type</methodname>
-
<methodparam><type>resource</type><parameter>result</parameter></methodparam>
-
<methodparam><type>int</type><parameter>field_offset</parameter></methodparam>
- </methodsynopsis>
- <para>
- Функция <function>mysql_field_type</function> аналогична
функции
- <function>mysql_field_name</function>. Аргументы одинаковы, но
вместо
- имени колонки возвращается её тип. Поля могут быть
типов
- "int", "real", "string", "blob", а также
других, описанных в
- <link xlink:href="&url.mysql.docs;">документации
MySQL</link>.
- <example>
- <title>Пример использования
<function>mysql_field_type</function></title>
- <programlisting role="php">
+<refentry xml:id="function.mysql-field-type" xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink">
+ <refnamediv>
+ <refname>mysql_field_type</refname>
+ <refpurpose>Возвращает тип указанного поля из
результата запроса</refpurpose>
+ </refnamediv>
+
+ <refsect1 role="description">
+ &reftitle.description;
+ <methodsynopsis>
+ <type>string</type><methodname>mysql_field_type</methodname>
+
<methodparam><type>resource</type><parameter>result</parameter></methodparam>
+
<methodparam><type>int</type><parameter>field_offset</parameter></methodparam>
+ </methodsynopsis>
+ <para>
+ Функция <function>mysql_field_type</function> аналогична
функции
+ <function>mysql_field_name</function>. Аргументы одинаковы, но
вместо
+ имени колонки возвращается её тип.
+ </para>
+ </refsect1>
+
+ <refsect1 role="parameters">
+ &reftitle.parameters;
+ <para>
+ <variablelist>
+ &mysql.result.description;
+ &mysql.field-offset.req.description;
+ </variablelist>
+ </para>
+ </refsect1>
+
+ <refsect1 role="returnvalues">
+ &reftitle.returnvalues;
+ <para>
+ Поля могут быть следующих типов:
<literal>"int"</literal>,
+ <literal>"real"</literal>,
<literal>"string"</literal>,
+ <literal>"blob"</literal> и других, подробно
описанных
+ <link xlink:href="&url.mysql.docs;">документации
MySQL</link>.
+ </para>
+ </refsect1>
+
+ <refsect1 role="examples">
+ &reftitle.examples;
+ <para>
+ <example>
+ <title>Пример использования
<function>mysql_field_type</function></title>
+ <programlisting role="php">
<![CDATA[
<?php
- mysql_connect("localhost", "mysql_username", "mysql_password");
- mysql_select_db("mysql");
- $result = mysql_query("SELECT * FROM func");
- $fields = mysql_num_fields($result);
- $rows = mysql_num_rows($result);
- $table = mysql_field_table($result, 0);
- echo "Your '".$table."' table has ".$fields." fields and
".$rows." record(s)\n";
- echo "The table has the following fields:\n";
- for ($i=0; $i < $fields; $i++) {
- $type = mysql_field_type($result, $i);
- $name = mysql_field_name($result, $i);
- $len = mysql_field_len($result, $i);
- $flags = mysql_field_flags($result, $i);
- echo $type." ".$name." ".$len." ".$flags."\n";
- }
- mysql_free_result($result);
- mysql_close();
+mysql_connect("localhost", "mysql_username", "mysql_password");
+mysql_select_db("mysql");
+$result = mysql_query("SELECT * FROM func");
+$fields = mysql_num_fields($result);
+$rows = mysql_num_rows($result);
+$table = mysql_field_table($result, 0);
+echo "Ваша таблица '" . $table . "' содержит " .
$fields . " поля и " . $rows . " запись\n";
+echo "В таблице есть следующие поля:\n";
+for ($i=0; $i < $fields; $i++) {
+ $type = mysql_field_type($result, $i);
+ $name = mysql_field_name($result, $i);
+ $len = mysql_field_len($result, $i);
+ $flags = mysql_field_flags($result, $i);
+ echo $type . " " . $name . " " . $len . " " . $flags .
"\n";
+}
+mysql_free_result($result);
+mysql_close();
?>
]]>
- </programlisting>
- <para>
- Вышеописанный пример выдаст следующий результат:
- </para>
- <screen>
+ </programlisting>
+ &example.outputs.similar;
+ <screen>
<![CDATA[
-Your 'func' table has 4 fields and 1 record(s)
-The table has the following fields:
+Ваша таблица 'func' содержит 4 поля и 1 запись
+В таблице есть следующие поля:
string name 64 not_null primary_key binary
int ret 1 not_null
string dl 128 not_null
string type 9 not_null enum
]]>
- </screen>
- </example>
- </para>
- <para>
- Для совместимости доступна функция
- <function>mysql_fieldtype</function>. Однако, её
использование крайне не
- рекомендуется.
- </para>
- </refsect1>
- </refentry>
+ </screen>
+ </example>
+ </para>
+ </refsect1>
+ <refsect1 role="notes">
+ &reftitle.notes;
+ <note>
+ <para>
+ &info.deprecated.alias;
+ <function>mysql_fieldtype</function>
+ </para>
+ </note>
+ </refsect1>
+
+ <refsect1 role="seealso">
+ &reftitle.seealso;
+ <para>
+ <simplelist>
+ <member><function>mysql_field_name</function></member>
+ <member><function>mysql_field_len</function></member>
+ </simplelist>
+ </para>
+ </refsect1>
+
+</refentry>
+
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
@@ -81,7 +118,7 @@
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
-sgml-default-dtd-file:"../~/.phpdoc/manual.ced"
+sgml-default-dtd-file:"~/.phpdoc/manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil