cvs: phpdoc-zh /reference/mysql/functions mysql-field-flags.xml mysql-field-len.xml mysql-field-name.xml mysql-field-seek.xml mysql-field-table.xml
mysql-field-type.xml

From: Date: Fri, 28 Feb 2003 07:33:08 +0000
Subject: cvs: phpdoc-zh /reference/mysql/functions mysql-field-flags.xml mysql-field-len.xml mysql-field-name.xml mysql-field-seek.xml mysql-field-table.xml
mysql-field-type.xml
Groups: php.doc.zh 
Request: Send a blank email to doc-zh+get-1147@lists.php.net to get a copy of this message
dallas Fri Feb 28 02:33:08 2003 EDT Added files: /phpdoc-zh/reference/mysql/functions mysql-field-flags.xml mysql-field-len.xml mysql-field-name.xml mysql-field-seek.xml mysql-field-table.xml mysql-field-type.xml Log: Completed.

Index: phpdoc-zh/reference/mysql/functions/mysql-field-flags.xml +++ phpdoc-zh/reference/mysql/functions/mysql-field-flags.xml <?xml version="1.0" encoding="gb2312"?> <!-- $Revision: 1.1 $ --> <!-- $Author: dallas $ --> <!-- EN-Revision: 1.2 Maintainer: dallas Status: ready --> <refentry id="function.mysql-field-flags"> <refnamediv> <refname>mysql_field_flags</refname> <refpurpose> ´Ó½á¹ûÖÐÈ¡µÃºÍÖ¸¶¨×ֶιØÁªµÄ±êÖ¾ </refpurpose> </refnamediv> <refsect1> <title>˵Ã÷</title> <methodsynopsis> <type>string</type><methodname>mysql_field_flags</methodname> <methodparam><type>resource</type><parameter>result</parameter></methodparam> <methodparam><type>int</type><parameter>field_offset</parameter></methodparam> </methodsynopsis> <para> <function>mysql_field_flags</function> ·µ»ØÖ¸¶¨×ֶεÄ×ֶαêÖ¾¡£Ã¿¸ö±êÖ¾¶¼ÓÃÒ»¸öµ¥´Ê±íʾ£¬Ö®¼äÓÃÒ»¸ö¿Õ¸ñ·Ö¿ª£¬Òò´Ë¿ÉÒÔÓà <function>explode</function> ½«Æä·Ö¿ª¡£ </para> <para> Èç¹û MySQL °æ±¾×㹻У¬Ôò»áÖ§³ÖÒÔϵıêÖ¾£º"not_null", "primary_key", "unique_key", "multiple_key", "blob", "unsigned", "zerofill", "binary", "enum", "auto_increment", "timestamp"¡£ </para> <para> ΪÏòϼæÈÝÈÔÈ»¿ÉÒÔʹÓà <function>mysql_fieldflags</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 --> Index: phpdoc-zh/reference/mysql/functions/mysql-field-len.xml +++ phpdoc-zh/reference/mysql/functions/mysql-field-len.xml <?xml version="1.0" encoding="gb2312"?> <!-- $Revision: 1.1 $ --> <!-- $Author: dallas $ --> <!-- EN-Revision: 1.2 Maintainer: dallas Status: ready --> <refentry id="function.mysql-field-len"> <refnamediv> <refname>mysql_field_len</refname> <refpurpose> ·µ»ØÖ¸¶¨×ֶεij¤¶È </refpurpose> </refnamediv> <refsect1> <title>˵Ã÷</title> <methodsynopsis> <type>int</type><methodname>mysql_field_len</methodname> <methodparam><type>resource</type><parameter>result</parameter></methodparam> <methodparam><type>int</type><parameter>field_offset</parameter></methodparam> </methodsynopsis> <para> <function>mysql_field_len</function> ·µ»ØÖ¸¶¨×ֶεij¤¶È¡£ </para> <para> ΪÏòϼæÈÝÈÔÈ»¿ÉÒÔʹÓà <function>mysql_fieldlen</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 --> Index: phpdoc-zh/reference/mysql/functions/mysql-field-name.xml +++ phpdoc-zh/reference/mysql/functions/mysql-field-name.xml <?xml version="1.0" encoding="gb2312"?> <!-- $Revision: 1.1 $ --> <!-- $Author: dallas $ --> <!-- EN-Revision: 1.3 Maintainer: dallas Status: ready --> <refentry id="function.mysql-field-name"> <refnamediv> <refname>mysql_field_name</refname> <refpurpose> È¡µÃ½á¹ûÖÐÖ¸¶¨×ֶεÄ×Ö¶ÎÃû </refpurpose> </refnamediv> <refsect1> <title>˵Ã÷</title> <methodsynopsis> <type>string</type><methodname>mysql_field_name</methodname> <methodparam><type>resource</type><parameter>result</parameter></methodparam> <methodparam><type>int</type><parameter>field_index</parameter></methodparam> </methodsynopsis> <para> <function>mysql_field_name</function> ·µ»ØÖ¸¶¨×Ö¶ÎË÷ÒýµÄ×Ö¶ÎÃû¡£<parameter>result</parameter> ±ØÐëÊÇÒ»¸öºÏ·¨µÄ½á¹û±êʶ·û£¬<parameter>field_index</parameter> ÊǸÃ×ֶεÄÊý×ÖÆ«ÒÆÁ¿¡£ </para> <note> <para> <parameter>field_index</parameter> ´Ó 0 ¿ªÊ¼¡£ </para> <para> ÀýÈ磬µÚÈý¸ö×ֶεÄË÷ÒýÖµÆäʵÊÇ 2£¬µÚËĸö×ֶεÄË÷ÒýÖµÊÇ 3£¬ÒÔ´ËÀàÍÆ¡£ </para> </note> <para> <example> <title><function>mysql_field_name</function> Àý×Ó</title> <programlisting role="php"> <![CDATA[ /* The users table consists of three fields: * user_id * username * password. */ $link = mysql_connect('localhost', "mysql_user", "mysql_password"); mysql_select_db($dbname, $link) or die("Could not set $dbname: " . mysql_error()); $res = mysql_query("select * from users", $link); echo mysql_field_name($res, 0) . "\n"; echo mysql_field_name($res, 2); ]]> </programlisting> <para> ÒÔÉÏÀý×Ó½«²úÉúÈçÏÂÊä³ö£º <screen> <![CDATA[ user_id password ]]> </screen> </para> </example> </para> <para> ΪÏòϼæÈÝÈÔÈ»¿ÉÒÔʹÓà <function>mysql_fieldname</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 --> Index: phpdoc-zh/reference/mysql/functions/mysql-field-seek.xml +++ phpdoc-zh/reference/mysql/functions/mysql-field-seek.xml <?xml version="1.0" encoding="gb2312"?> <!-- $Revision: 1.1 $ --> <!-- $Author: dallas $ --> <!-- EN-Revision: 1.2 Maintainer: dallas Status: ready --> <refentry id="function.mysql-field-seek"> <refnamediv> <refname>mysql_field_seek</refname> <refpurpose> ½«½á¹û¼¯ÖеÄÖ¸ÕëÉè¶¨ÎªÖÆ¶¨µÄ×Ö¶ÎÆ«ÒÆÁ¿ </refpurpose> </refnamediv> <refsect1> <title>˵Ã÷</title> <methodsynopsis> <type>int</type><methodname>mysql_field_seek</methodname> <methodparam><type>resource</type><parameter>result</parameter></methodparam> <methodparam><type>int</type><parameter>field_offset</parameter></methodparam> </methodsynopsis> <para> ÓÃÖ¸¶¨µÄ×Ö¶ÎÆ«ÒÆÁ¿¼ìË÷¡£Èç¹ûÏÂÒ»¸ö <function>mysql_fetch_field</function> µÄµ÷Óò»°üÀ¨×Ö¶ÎÆ«ÒÆÁ¿£¬Ôò»á·µ»Ø±¾´Î <function>mysql_field_seek</function> ÖÐÖ¸¶¨µÄÆ«ÒÆÁ¿µÄ×ֶΡ£ </para> <para> ²Î¼û <function>mysql_fetch_field</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 --> Index: phpdoc-zh/reference/mysql/functions/mysql-field-table.xml +++ phpdoc-zh/reference/mysql/functions/mysql-field-table.xml <?xml version="1.0" encoding="gb2312"?> <!-- $Revision: 1.1 $ --> <!-- $Author: dallas $ --> <!-- EN-Revision: 1.2 Maintainer: dallas Status: ready --> <refentry id="function.mysql-field-table"> <refnamediv> <refname>mysql_field_table</refname> <refpurpose> È¡µÃÖ¸¶¨×Ö¶ÎËùÔڵıíÃû </refpurpose> </refnamediv> <refsect1> <title>˵Ã÷</title> <methodsynopsis> <type>string</type><methodname>mysql_field_table</methodname> <methodparam><type>resource</type><parameter>result</parameter></methodparam> <methodparam><type>int</type><parameter>field_offset</parameter></methodparam> </methodsynopsis> <para> ·µ»ØÖ¸¶¨×Ö¶ÎËùÔڵıíµÄÃû×Ö¡£ </para> <para> ΪÏòϼæÈÝÈÔÈ»¿ÉÒÔʹÓà <function>mysql_fieldtable</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 --> Index: phpdoc-zh/reference/mysql/functions/mysql-field-type.xml +++ phpdoc-zh/reference/mysql/functions/mysql-field-type.xml <?xml version="1.0" encoding="gb2312"?> <!-- $Revision: 1.1 $ --> <!-- $Author: dallas $ --> <!-- EN-Revision: 1.5 Maintainer: dallas Status: ready --> <refentry id="function.mysql-field-type"> <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¡±ÒÔ¼°ÆäËü£¬Ïê¼û <ulink url="&url.mysql.docs;">MySQL ÊÖ²á</ulink>¡£ <example> <title>MySQL ×Ö¶ÎÀàÐÍ</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(); ?> ]]> </programlisting> <para> ÒÔÉÏÀý×Ó½«²úÉúÈçÏÂÊä³ö£º </para> <screen> <![CDATA[ Your 'func' table has 4 fields and 1 record(s) The table has the following fields: 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> <!-- 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 -->
« previous php.doc.zh (#1147) next »