cvs: phpdoc-zh /reference/mysql/functions mysql-db-name.xml mysql-db-query.xml

From: Date: Tue, 25 Feb 2003 10:11:20 +0000
Subject: cvs: phpdoc-zh /reference/mysql/functions mysql-db-name.xml mysql-db-query.xml
Groups: php.doc.zh 
Request: Send a blank email to doc-zh+get-1137@lists.php.net to get a copy of this message
dallas Tue Feb 25 05:11:20 2003 EDT Added files: /phpdoc-zh/reference/mysql/functions mysql-db-name.xml mysql-db-query.xml Log: Complete 1.2 1.4 Index: phpdoc-zh/reference/mysql/functions/mysql-db-name.xml +++ phpdoc-zh/reference/mysql/functions/mysql-db-name.xml <?xml version="1.0" encoding="gb2312"?> <!-- $Revision: 1.1 $ --> <!-- $Author: dallas $ --> <!-- EN-Revision: 1.2 Maintainer: dallas Status: ready --> <refentry id="function.mysql-db-name"> <refnamediv> <refname>mysql_db_name</refname> <refpurpose>È¡µÃ½á¹ûÊý¾Ý</refpurpose> </refnamediv> <refsect1> <title>˵Ã÷</title> <methodsynopsis> <type>string</type><methodname>mysql_db_name</methodname> <methodparam><type>resource</type><parameter>result</parameter></methodparam> <methodparam><type>int</type><parameter>row</parameter></methodparam> <methodparam choice="opt"><type>mixed</type><parameter> field </parameter></methodparam> </methodsynopsis> <para> <function>mysql_db_name</function> ½«µ÷Óà <function>mysql_list_dbs</function> ·µ»ØµÄ½á¹ûÖ¸Õë×÷ΪµÚÒ»¸ö²ÎÊý¡£<parameter>row</parameter> ²ÎÊýÊǽá¹û¼¯ÖеÄÒ»¸öË÷Òý¡£ </para> <para> Èç¹û³ö´íÔò·µ»Ø &false;¡£Óà <function>mysql_errno</function> ºÍ <function>mysql_error</function> À´È·¶¨´íÎóµÄÖÖÀà¡£ </para> <example> <title><function>mysql_db_name</function> Àý×Ó</title> <programlisting role="php"> <![CDATA[ <?php error_reporting(E_ALL); mysql_connect('dbhost', 'username', 'password'); $db_list = mysql_list_dbs(); $i = 0; $cnt = mysql_num_rows($db_list); while ($i < $cnt) { echo mysql_db_name($db_list, $i) . "\n"; $i++; } ?> ]]> </programlisting> </example> <para> ΪÏòϼæÈÝÒ²¿ÉÒÔÓà <function>mysql_dbname</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-db-query.xml +++ phpdoc-zh/reference/mysql/functions/mysql-db-query.xml <?xml version="1.0" encoding="gb2312"?> <!-- $Revision: 1.1 $ --> <!-- $Author: dallas $ --> <!-- EN-Revision: 1.4 Maintainer: dallas Status: ready --> <refentry id="function.mysql-db-query"> <refnamediv> <refname>mysql_db_query</refname> <refpurpose>·¢ËÍÒ»Ìõ MySQL ²éѯ</refpurpose> </refnamediv> <refsect1> <title>˵Ã÷</title> <methodsynopsis> <type>resource</type><methodname>mysql_db_query</methodname> <methodparam><type>string</type><parameter>database</parameter></methodparam> <methodparam><type>string</type><parameter>query</parameter></methodparam> <methodparam choice="opt"><type>resource</type><parameter> link_identifier </parameter></methodparam> </methodsynopsis> <para> ¸ù¾Ý²éѯ½á¹û·µ»ØÒ»¸öÕýµÄ MySQL ½á¹û×ÊÔ´ºÅ£¬³ö´íʱ·µ»Ø &false;¡£±¾º¯Êý»á¶Ô <literal>INSERT</literal>/<literal>UPDATE</literal>/<literal>DELETE</literal> ²éѯ·µ»Ø &true;/&false; À´Ö¸Ê¾³É¹¦»òʧ°Ü¡£ </para> <para> <function>mysql_db_query</function> Ñ¡ÔñÒ»¸öÊý¾Ý¿â²¢ÔÚÆäÉÏÖ´Ðвéѯ¡£Èç¹ûûÓÐÌṩ¿ÉÑ¡µÄÁ¬½Ó±êʶ£¬±¾º¯Êý»áÈ¥ÕÒÒ»¸öµ½ MySQL ·þÎñÆ÷µÄÒÑ´ò¿ªµÄÁ¬½Ó£¬Èç¹ûÕÒ²»µ½ÒÑ´ò¿ªÁ¬½ÓÔò»á³¢ÊÔÎÞ²ÎÊýµ÷Óà <function>mysql_connect</function> À´½¨Á¢Ò»¸ö¡£ </para> <para> ×¢Òâ´Ëº¯Êý<emphasis role="strong">²»»á</emphasis>Çл»»ØÏÈǰÁ¬½Óµ½µÄÊý¾Ý¿â¡£»»¾ä»°Ëµ£¬²»ÄÜÓô˺¯Êý<emphasis>ÁÙʱ</emphasis>ÔÚÁíÒ»¸öÊý¾Ý¿âÉÏÖ´ÐÐ sql ²éѯ£¬Ö»ÄÜÊÖ¹¤Çл»»ØÀ´¡£Ç¿ÁÒ½¨ÒéÓû§ÔÚ sql ²éѯÖÐʹÓà <literal>database.table</literal> Óï·¨À´Ìæ´ú´Ëº¯Êý¡£ </para> <para> ²Î¼û <function>mysql_connect</function> ºÍ <function>mysql_query</function>¡£ </para> <para> <note> <simpara> ×Ô PHP 4.0.6 Æð²»ÌᳫʹÓô˺¯Êý¡£²»ÒªÓô˺¯Êý£¬Óà <function>mysql_select_db</function> ºÍ <function>mysql_query</function> À´Ìæ´ú¡£ </simpara> </note> </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 (#1137) next »