cvs: phpdoc-zh /reference/mysql configure.xml ini.xml reference.xml
| From: | Dallas Thunder | Date: | Thu, 11 Aug 2005 00:43:21 +0000 |
| Subject: | cvs: phpdoc-zh /reference/mysql configure.xml ini.xml reference.xml | ||
| Groups: | php.doc.zh | ||
| Request: | Send a blank email to doc-zh+get-2144@lists.php.net to get a copy of this message | ||
dallas Wed Aug 10 20:43:21 2005 EDT
Modified files:
/phpdoc-zh/reference/mysql configure.xml ini.xml reference.xml
Log:
Updated.
http://cvs.php.net/diff.php/phpdoc-zh/reference/mysql/configure.xml?r1=1.5&r2=1.6&ty=u Index: phpdoc-zh/reference/mysql/configure.xml diff -u phpdoc-zh/reference/mysql/configure.xml:1.5 phpdoc-zh/reference/mysql/configure.xml:1.6 --- phpdoc-zh/reference/mysql/configure.xml:1.5 Tue Jul 22 22:21:27 2003 +++ phpdoc-zh/reference/mysql/configure.xml Wed Aug 10 20:43:19 2005 @@ -1,44 +1,117 @@ -<?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.5 $ --> -<!-- $Author: yincheng $ --> -<!-- EN-Revision: 1.7 Maintainer: Gregory Status: ready --> - <section id="mysql.installation"> - &reftitle.install; - <para id="mysql.configure"> - µ±ÄãÑ¡ÔñÁË <option role="configure">--with-mysql[=DIR]</option> - ÅäÖÃÑ¡ÏîµÄʱºò£¬Äã´ò¿ªÁË PHP ·ÃÎÊ MySQL - Êý¾Ý¿âµÄ¹¦ÄÜ¡£ +<?xml version="1.0" encoding="gb2312"?> +<!-- $Revision: 1.6 $ --> +<!-- $Author: dallas $ --> +<!-- EN-Revision: 1.13 Maintainer: dallas Status: ready --> +<!-- CREDITS: Gregory --> +<section id="mysql.installation"> + &reftitle.install; + + <para id="mysql.configure"> + ±àÒëʱ£¬Ö»ÒªÊ¹Óà + <option role="configure">--with-mysql[=DIR]</option> + ÅäÖÃÑ¡Ïî¼´¿É£¬ÆäÖпÉÑ¡µÄ + <literal>[DIR]</literal> Ö¸Ïò MySQL µÄ°²×°Ä¿Â¼¡£ + </para> + <para> + ±¾ MySQL À©Õ¹¿â²»Ö§³Ö MySQL 4.1.0 ÒÔÉϰ汾ȫ²¿¹¦ÄÜ¡£¶Ô´Ë£¬¿ÉÓà + <link linkend="ref.mysqli">MySQLi</link>¡£ + </para> + <para> + Èç¹ûҪͬʱ°²×° mysql À©Õ¹¿âºÍ mysqli À©Õ¹¿â£¬±ØÐëʹÓÃͬһ¸ö¿Í»§¶Ë¿âÒÔ±ÜÃâÈκγåÍ»¡£ + </para> + + <section id="mysql.installation.linux"> + <title>ÔÚ Linux ϵͳϰ²×°</title> + <section> + <title>PHP 4</title> + <para> + ĬÈÏ¿ªÆôÁË <option role="configure">--with-mysql</option> + Ñ¡Ïî¡£´ËĬÈÏÐÐΪ¿ÉÒÔÓà + <option role="configure">--without-mysql</option> + ÅäÖÃÑ¡ÏîÀ´½ûÖ¹¡£Èç¹ûÆôÓà MySQL ¶ø²»Ö¸¶¨°²×°Ä¿Â¼µÄ»°£¬PHP + ½«Ê¹ÓÃ°ó¶¨µÄ MySQL ¿Í»§¶ËÁ¬½Ó¿â¡£ + </para> + <para> + »¹ÓÐÆäËüÓ¦ÓóÌÐòʹÓà MySQL£¨ÀýÈç + auth-mysql£©µÄÓû§²»ÒªÓð󶨵Ŀ⣬¶øÒªÖ¸¶¨ MySQL µÄ°²×°Ä¿Â¼£¬ÈçÕâÑù£º<option + role="configure">--with-mysql=/path/to/mysql</option>¡£Õâ½«Ç¿ÖÆ + PHP ʹÓÃËæ MySQL °²×°µÄ¿Í»§¶ËÁ¬½Ó¿â£¬¾Í¿ÉÒÔ±ÜÃâÈκγåÍ»¡£ + </para> + </section> + <section> + <title>PHP 5+</title> + <para> + MySQL ĬÈÏδÆôÓã¬Ò²Ã»ÓÐ°ó¶¨µÄ MySQL ¿â¡£ÆäÔÒò¼û´Ë + <link linkend="faq.databases.mysql.php5">FAQ</link>¡£Ê¹Óà + <option role="configure">--with-mysql[=DIR]</option> + ÅäÖÃÑ¡ÏîÀ´¼ÓÈë MySQL µÄÖ§³Ö¡£¿ÉÒÔ´Ó + <ulink url="&url.mysql;">MySQL</ulink> + ÏÂÔØ<emphasis>Í·ÎļþºÍ¿â</emphasis>¡£ + </para> + </section> + </section> + + <section id="mysql.installation.windows"> + <title>ÔÚ Windows ϵͳϰ²×°</title> + <section> + <title>PHP 4</title> + <para> + PHP MySQL À©Õ¹ÒѾ±àÒëÈë PHP¡£ + </para> + </section> + <section> + <title>PHP 5+</title> + <para> + MySQL ĬÈÏδÆôÓã¬Òò´Ë±ØÐëÔÚ &php.ini; Ö줻î + <filename>php_mysql.dll</filename> ¶¯Ì¬Á¬½Ó¿â¡£´ËÍ⣬PHP + »¹ÐèÒª·ÃÎÊ MySQL ¿Í»§¶ËÁ¬½Ó¿â¡£PHP µÄ Windows + ·¢Ðаæ°üÀ¨ÁËÒ»¸ö + <filename>libmysql.dll</filename>£¬ÎªÁËÈà PHP ÄÜºÍ + MySQL ¶Ô»°£¬´ËÎļþ±ØÐë·ÅÔÚ Windows µÄϵͳ·¾¶ + <envar>PATH</envar> ÖС£ÔõÑù×ö¼û FAQ + Öеġ°<link linkend="faq.installation.addtopath">ÔõÑù°Ñ PHP + Ŀ¼¼ÓÈëµ½ Windows ·¾¶ÖÐ</link>¡±¡£¾¡¹Ü½« + <filename>libmysql.dll</filename> ¿½±´µ½ Windows + ϵͳĿ¼ÖÐÒ²¿ÉÒÔ£¨ÒòΪϵͳĿ¼ĬÈÏÔÚϵͳ·¾¶ + <envar>PATH</envar> ÖУ©£¬µ«²»ÍƼöÕâÑù×ö¡£ + </para> + <para> + Òª¼¤»îÈκΠPHP À©Õ¹¿â£¨ÀýÈç + <filename>php_mysql.dll</filename>£©£¬PHP Ö¸Áî + <link linkend="ini.extension-dir">extension_dir</link> + Òª±»ÉèΪ PHP À©Õ¹¿âËùÔÚµÄĿ¼¡£²Î¼û<link + linkend="install.windows.manual">ÊÖ¹¤ Windows + °²×°Ö¸ÄÏ</link>¡£PHP 5 Ï extension_dir ȡֵµÄÒ»¸öÀý×ÓÊÇ + <literal>c:\php\ext</literal>¡£ + </para> + <note> + <para> + Èç¹ûÆô¶¯ web ·þÎñÆ÷ʱ³öÏÖÀàËÆÈçϵĴíÎó£º<literal>"Unable + to load dynamic library './php_mysql.dll'"</literal>£¬ÕâÊÇÒòΪϵͳÕÒ²»µ½ + <filename>php_mysql.dll</filename> ºÍ£¯»ò + <filename>libmysql.dll</filename>¡£ </para> + </note> + </section> + </section> + + <section id="mysql.installation.notes"> + <title>MySQL °²×°×¢ÒâÊÂÏî</title> + <warning> <para> - PHP 4 ĬÈÏʹÓÃÁË - <option role="configure">--with-mysql</option> Ñ¡ÏÒò´ËÒª½ûÓà - MySQL ±ØÐëʹÓà - <option role="configure">--without-mysql</option>¡£ÔÚ PHP 4 ÖУ¬Èç¹ûÄãûÓÐÔÚÅäÖÃÑ¡ÏîÖÐÖ¸¶¨ - MySQL µÄ·¾¶ÐÅÏ¢£¬PHP »áʹÓÃ°ó¶¨µÄ MySQL ¿Í»§¶Ë¿â¡£ÔÚ Windows Ï£¬Ã»ÓÐÏà¹ØµÄ DLL Îļþ£¬¸ÃÄ£¿éÒѾÄÚ½¨ÔÚÁË PHP ÄÚºËÖС£Óû§Èç¹ûÔËÐÐÆäËüʹÓà - MySQL µÄÓ¦Óã¨ÀýÈçͬʱʹÓà Apache Ä£¿é»¯·½Ê½ÔËÐÐµÄ - PHP 3 ºÍ PHP 4£¬»òÕß auth-mysql Ä£¿é£©ÐèÒªÖ¸¶¨ MySQLµÄ·¾¶£º<option - role="configure">--with-mysql=/path/to/mysql</option>¡£Õâ»áÇ¿ÆÈ - PHP ʹÓà MySQL °²×°µÄ¿Í»§¶Ë¿âº¯ÊýÀ´±ÜÃâÈκγåÍ»¡£ + µ±Í¬Ê±¼ÓÔÚ±¾À©Õ¹¿âºÍ recode À©Õ¹¿âʱ PHP ¿ÉÄÜ»á±ÀÀ£¡£¸ü¶àÐÅÏ¢¼û + <link linkend="ref.recode">recode</link> À©Õ¹¿â¡£ </para> - <para> - ÔÚ PHP 5 ÖУ¬MySQL ²»ÔÙĬÈϵĿªÆô£¬MySQL ¿âÒ²²»ÔÙºÍ PHP °ó¶¨£¬ÇëÔĶÁ¸Ã <link linkend="faq.databases.mysql.php5">FAQ</link> ÒÔ»ñÈ¡¸üÏêϸµÄÐÅÏ¢¡£ + </warning> + <note> + <para> + Èç¹ûÐèÒª²»Í¬ÓÚ + <emphasis>latin</emphasis>£¨Ä¬ÈÏÖµ£©µÄ×Ö·û¼¯£¬±ØÐë°²×°ÍⲿµÄ£¨·Ç°ó¶¨µÄ£©ÒѱàÒëÈëËùÐè×Ö·û¼¯Ö§³ÖµÄ + libmysql¡£ </para> - <para> - ¸Ã MySQL À©Õ¹¿âÎÞ·¨ºÍ 4.1.0 ÒÔÉϰ汾µÄ MySQL Ò»Æð¹¤×÷¡£Õâʱ£¬ÄúÐèҪʹÓà <link linkend="ref.mysqli">MySQLi</link>¡£ - </para> - <warning> - <para> - µ±¸ÃÀ©Õ¹Ä£¿éÓë recode À©Õ¹Ä£¿é¹²Í¬Ê¹ÓõÄʱºò£¬¿ÉÄÜ»áÔì³É - <literal>PHP</literal> µÄ±ÀÀ£ºÍÆô¶¯Ê±³öÏÖÎÊÌâ¡£Çë²éѯ - <link linkend="ref.recode">recode</link> À©Õ¹»ñµÃ¸ü¶àµÄÐÅÏ¢¡£ - </para> - </warning> - <note> - <para> - Èç¹ûÄúÐèÒª³ý <emphasis>latin</emphasis>£¨Ä¬ÈÏ£©ÒÔÍâÆäËüµÄ×Ö·û¼¯£¬ÄúÐèÒª°²×°ÓÐÒѱàÒë×Ö·û¼¯Ö§³ÖµÄÍâÖã¨Î´¼¯³É£©libmysql¡£ - </para> - </note> - </section> + </note> + </section> +</section> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/diff.php/phpdoc-zh/reference/mysql/ini.xml?r1=1.2&r2=1.3&ty=u Index: phpdoc-zh/reference/mysql/ini.xml diff -u phpdoc-zh/reference/mysql/ini.xml:1.2 phpdoc-zh/reference/mysql/ini.xml:1.3 --- phpdoc-zh/reference/mysql/ini.xml:1.2 Tue May 6 03:25:38 2003 +++ phpdoc-zh/reference/mysql/ini.xml Wed Aug 10 20:43:19 2005 @@ -1,193 +1,223 @@ -<?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.2 $ --> -<!-- $Author: gregory $ --> -<!-- EN-Revision: 1.5 Maintainer: Gregory Status: ready --> +<?xml version="1.0" encoding="gb2312"?> +<!-- $Revision: 1.3 $ --> +<!-- $Author: dallas $ --> +<!-- EN-Revision: 1.13 Maintainer: Gregory Status: ready --> +<!-- CREDITS: dallas --> <section id="mysql.configuration"> &reftitle.runtime; &extension.runtime; - <para> - <table> - <title>MySQL ÅäÖÃÑ¡Ïî</title> - <tgroup cols="3"> - <thead> - <row> - <entry>Ñ¡ÏîÃû³Æ</entry> - <entry>ĬÈÏÖµ</entry> - <entry>¿É±äµÄ</entry> - </row> - </thead> - <tbody> - <row> - <entry>mysql.allow_persistent</entry> - <entry>"On"</entry> - <entry>PHP_INI_SYSTEM</entry> - </row> - <row> - <entry>mysql.max_persistent</entry> - <entry>"-1"</entry> - <entry>PHP_INI_SYSTEM</entry> - </row> - <row> - <entry>mysql.max_links</entry> - <entry>"-1"</entry> - <entry>PHP_INI_SYSTEM</entry> - </row> - <row> - <entry>mysql.default_port</entry> - <entry>NULL</entry> - <entry>PHP_INI_ALL</entry> - </row> - <row> - <entry>mysql.default_socket</entry> - <entry>NULL</entry> - <entry>PHP_INI_ALL</entry> - </row> - <row> - <entry>mysql.default_host</entry> - <entry>NULL</entry> - <entry>PHP_INI_ALL</entry> - </row> - <row> - <entry>mysql.default_user</entry> - <entry>NULL</entry> - <entry>PHP_INI_ALL</entry> - </row> - <row> - <entry>mysql.default_password</entry> - <entry>NULL</entry> - <entry>PHP_INI_ALL</entry> - </row> - <row> - <entry>mysql.connect_timeout</entry> - <entry>"0"</entry> - <entry>PHP_INI_SYSTEM</entry> - </row> - </tbody> - </tgroup> - </table> - ¸üÏêϸµÄÐÅÏ¢ÒÔ¼° PHP_INI_* ³£Á¿µÄ¶¨Ò壬Çë²Î¿¼ - <function>ini_set</function>¡£ - </para> - - &ini.descriptions.title; - - <para> - <variablelist> - - <varlistentry id="ini.mysql.allow-persistent"> - <term> - <parameter>mysql.allow_persistent</parameter> - <type>boolean</type> - </term> - <listitem> - <para> - ÊÇ·ñÔÊÐí - <link linkend="features.persistent-connections">±£³ÖÁ¬½Ó</link> - µ½ MySQL¡£ - </para> - </listitem> - </varlistentry> - - <varlistentry id="ini.mysql.max-persistent"> - <term> - <parameter>mysql.max_persistent</parameter> - <type>integer</type> - </term> - <listitem> - <para> - ÿ¸ö½ø³ÌÖÐ×î´ó±£³ÖÁ¬½ÓÊý¡£ - </para> - </listitem> - </varlistentry> - - <varlistentry id="ini.mysql.max-links"> - <term> - <parameter>mysql.max_links</parameter> - <type>integer</type> - </term> - <listitem> - <para> - ÿ¸ö½ø³ÌÖÐ×î´óµÄÁ¬½ÓÊý£¬°üÀ¨±£³ÖÁ¬½Ó¡£ - </para> - </listitem> - </varlistentry> - - <varlistentry id="ini.mysql.default-port"> - <term> - <parameter>mysql.default_port</parameter> - <type>string</type> - </term> - <listitem> - <para> - Ö¸¶¨Ä¬ÈÏÁ¬½ÓÊý¾Ý¿âµÄ TCP ¶Ë¿ÚºÅ¡£Èç¹ûûÓÐÖ¸¶¨Ä¬È϶˿ںţ¬²à˳Ðò´Ó <literal>MYSQL_TCP_PORT</literal> - »·¾³±äÁ¿£¬<filename>/etc/services</filename> ÎļþÖÐµÄ <literal>mysql-tcp</literal> - Ïî»òÕß±àÒëʱָ¶¨µÄ <literal>MYSQL_PORT</literal> ³£Á¿ÖлñµÃ¡£Win32 »·¾³ÏÂÖ»»áʹÓà - <literal>MYSQL_PORT</literal> ³£Á¿¡£ - </para> - </listitem> - </varlistentry> - - <varlistentry id="ini.mysql.default-socket"> - <term> - <parameter>mysql.default_socket</parameter> - <type>string</type> - </term> - <listitem> - <para> - µ±Ê¹Óñ¾µØÁ¬½ÓµÄʱºò£¬Ä¬È쵀 socket Ãû³Æ¡£ - </para> - </listitem> - </varlistentry> - - <varlistentry id="ini.mysql.default-host"> - <term> - <parameter>mysql.default_host</parameter> - <type>string</type> - </term> - <listitem> - <para> - ĬÈÏÁ¬½ÓµÄÊý¾Ý¿â·þÎñÆ÷µØÖ·¡£¸Ã²ÎÊý²»ÄÜÓÃÓÚ<link linkend="ini.safe-mode">°²È«Ä£Ê½</link>¡£ - </para> - </listitem> - </varlistentry> - - <varlistentry id="ini.mysql.default-user"> - <term> - <parameter>mysql.default_user</parameter> - <type>string</type> - </term> - <listitem> - <para> - ĬÈÏÁ¬½ÓÊý¾Ý¿âʱʹÓõÄÓû§Ãû¡£¸Ã²ÎÊý²»ÄÜÓÃÓÚ<link linkend="ini.safe-mode">°²È«Ä£Ê½</link>¡£ - </para> - </listitem> - </varlistentry> - <varlistentry id="ini.mysql.default-password"> - <term> - <parameter>mysql.default_password</parameter> - <type>string</type> - </term> - <listitem> - <para> - ĬÈÏÁ¬½ÓÊý¾Ý¿âʱʹÓõÄÃÜÂë¡£¸Ã²ÎÊý²»ÄÜÓÃÓÚ<link linkend="ini.safe-mode">°²È«Ä£Ê½</link>¡£ - </para> - </listitem> - </varlistentry> - - <varlistentry id="ini.mysql.connect-timeout"> - <term> - <parameter>mysql.connect_timeout</parameter> - <type>integer</type> - </term> - <listitem> - <para> - Á¬½Ó³¬Ê±ÃëÊý¡£ÔÚ Linux ÖУ¬Õâ¸ö²ÎÊýÉ趨Á˵ȺòÀ´×Ô·þÎñÆ÷µÄÏìÓ¦µÄʱ³¤¡£ - </para> - </listitem> - </varlistentry> - </variablelist> - </para> - </section> + <para> + <table> + <title>MySQL ÅäÖÃÑ¡Ïî</title> + <tgroup cols="4"> + <thead> + <row> + <entry>Ñ¡ÏîÃû³Æ</entry> + <entry>ĬÈÏÖµ</entry> + <entry>¿É±ä·¶Î§</entry> + <entry>¸üмͼ</entry> + </row> + </thead> + <tbody> + <row> + <entry>mysql.allow_persistent</entry> + <entry>"1"</entry> + <entry>PHP_INI_SYSTEM</entry> + <entry></entry> + </row> + <row> + <entry>mysql.max_persistent</entry> + <entry>"-1"</entry> + <entry>PHP_INI_SYSTEM</entry> + <entry></entry> + </row> + <row> + <entry>mysql.max_links</entry> + <entry>"-1"</entry> + <entry>PHP_INI_SYSTEM</entry> + <entry></entry> + </row> + <row> + <entry>mysql.trace_mode</entry> + <entry>"0"</entry> + <entry>PHP_INI_ALL</entry> + <entry>×Ô PHP 4.3.0 Æð¿ÉÓÃ</entry> + </row> + <row> + <entry>mysql.default_port</entry> + <entry>NULL</entry> + <entry>PHP_INI_ALL</entry> + <entry></entry> + </row> + <row> + <entry>mysql.default_socket</entry> + <entry>NULL</entry> + <entry>PHP_INI_ALL</entry> + <entry>×Ô PHP 4.0.1 Æð¿ÉÓÃ</entry> + </row> + <row> + <entry>mysql.default_host</entry> + <entry>NULL</entry> + <entry>PHP_INI_ALL</entry> + <entry></entry> + </row> + <row> + <entry>mysql.default_user</entry> + <entry>NULL</entry> + <entry>PHP_INI_ALL</entry> + <entry></entry> + </row> + <row> + <entry>mysql.default_password</entry> + <entry>NULL</entry> + <entry>PHP_INI_ALL</entry> + <entry></entry> + </row> + <row> + <entry>mysql.connect_timeout</entry> + <entry>"60"</entry> + <entry>PHP_INI_ALL</entry> + <entry>×Ô PHP 4.3.0 Æð¿ÉÓá£ÔÚ PHP <= 4.3.2 ʱΪ PHP_INI_SYSTEM</entry> + </row> + </tbody> + </tgroup> + </table> + &ini.php.constants; + </para> + + &ini.descriptions.title; + + <para> + <variablelist> + <varlistentry id="ini.mysql.allow-persistent"> + <term> + <parameter>mysql.allow_persistent</parameter> + <type>boolean</type> + </term> + <listitem> + <para> + ÊÇ·ñÔÊÐí MySQL + µÄ<link linkend="features.persistent-connections">±£³ÖÁ¬½Ó</link>¡£ + </para> + </listitem> + </varlistentry> + <varlistentry id="ini.mysql.max-persistent"> + <term> + <parameter>mysql.max_persistent</parameter> + <type>integer</type> + </term> + <listitem> + <para> + ÿ¸ö½ø³ÌÖÐ×î´óµÄ±£³ÖÁ¬½ÓÊý¡£ + </para> + </listitem> + </varlistentry> + + <varlistentry id="ini.mysql.max-links"> + <term> + <parameter>mysql.max_links</parameter> + <type>integer</type> + </term> + <listitem> + <para> + ÿ¸ö½ø³ÌÖÐ×î´óµÄÁ¬½ÓÊý£¬°üÀ¨±£³ÖÁ¬½Ó¡£ + </para> + </listitem> + </varlistentry> + + <varlistentry id="ini.mysql.trace-mode"> + <term> + <parameter>mysql.trace_mode</parameter> + <type>boolean</type> + </term> + <listitem> + <para> + ¸ú×Ùģʽ¡£µ±¼¤»î <literal>mysql.trace_mode</literal> + ʱ£¬½«»áÏÔʾ table/index + ɨÃèµÄ¾¯¸æ£¬Î´ÊͷŵĽá¹û¼¯ÒÔ¼° + SQL ´íÎó¡££¨PHP 4.3.0 Òý½ø£© + </para> + </listitem> + </varlistentry> + + <varlistentry id="ini.mysql.default-port"> + <term> + <parameter>mysql.default_port</parameter> + <type>string</type> + </term> + <listitem> + <para> + Ö¸¶¨Ä¬ÈÏÁ¬½ÓÊý¾Ý¿âµÄ TCP ¶Ë¿ÚºÅ¡£Èç¹ûûÓÐÖ¸¶¨Ä¬È϶˿ںţ¬Ôò°´Ë³Ðò´Ó + <envar>MYSQL_TCP_PORT</envar> + »·¾³±äÁ¿£¬<filename>/etc/services</filename> ÎļþÖÐµÄ <literal>mysql-tcp</literal> + Ïî»òÕß±àÒëʱָ¶¨µÄ <constant>MYSQL_PORT</constant> ³£Á¿ÖÐÈ¡µÃ¡£Win32 »·¾³ÏÂÖ»»áʹÓà + <constant>MYSQL_PORT</constant> ³£Á¿¡£ + </para> + </listitem> + </varlistentry> + + <varlistentry id="ini.mysql.default-socket"> + <term> + <parameter>mysql.default_socket</parameter> + <type>string</type> + </term> + <listitem> + <para> + µ±Ê¹Óñ¾µØÁ¬½ÓµÄʱºò£¬Ä¬È쵀 socket Ãû³Æ¡£ + </para> + </listitem> + </varlistentry> + + <varlistentry id="ini.mysql.default-host"> + <term> + <parameter>mysql.default_host</parameter> + <type>string</type> + </term> + <listitem> + <para> + ĬÈÏÁ¬½ÓµÄÊý¾Ý¿â·þÎñÆ÷µØÖ·¡£¸Ã²ÎÊý²»ÄÜÓÃÓÚ&sqlsafemode;¡£ + </para> + </listitem> + </varlistentry> + + <varlistentry id="ini.mysql.default-user"> + <term> + <parameter>mysql.default_user</parameter> + <type>string</type> + </term> + <listitem> + <para> + ĬÈÏÁ¬½ÓÊý¾Ý¿âʱʹÓõÄÓû§Ãû¡£¸Ã²ÎÊý²»ÄÜÓÃÓÚ&sqlsafemode;¡£ + </para> + </listitem> + </varlistentry> + + <varlistentry id="ini.mysql.default-password"> + <term> + <parameter>mysql.default_password</parameter> + <type>string</type> + </term> + <listitem> + <para> + ĬÈÏÁ¬½ÓÊý¾Ý¿âʱʹÓõÄÃÜÂë¡£&sqlsafemode;¡£ + </para> + </listitem> + </varlistentry> + + <varlistentry id="ini.mysql.connect-timeout"> + <term> + <parameter>mysql.connect_timeout</parameter> + <type>integer</type> + </term> + <listitem> + <para> + Á¬½Ó³¬Ê±ÃëÊý¡£ÔÚ Linux ÖУ¬Õâ¸ö²ÎÊýÉ趨Á˵ȺòÀ´×Ô·þÎñÆ÷µÄÏìÓ¦µÄʱ³¤¡£ + </para> + </listitem> + </varlistentry> + </variablelist> + </para> +</section> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/diff.php/phpdoc-zh/reference/mysql/reference.xml?r1=1.9&r2=1.10&ty=u Index: phpdoc-zh/reference/mysql/reference.xml diff -u phpdoc-zh/reference/mysql/reference.xml:1.9 phpdoc-zh/reference/mysql/reference.xml:1.10 --- phpdoc-zh/reference/mysql/reference.xml:1.9 Tue May 20 03:01:54 2003 +++ phpdoc-zh/reference/mysql/reference.xml Wed Aug 10 20:43:19 2005 @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="gb2312"?> -<!-- $Revision: 1.9 $ --> -<!-- $Author: gregory $ --> -<!-- EN-Revision: 1.16 Maintainer: Gregory Status: ready --> +<!-- $Revision: 1.10 $ --> +<!-- $Author: dallas $ --> +<!-- EN-Revision: 1.21 Maintainer: Gregory Status: ready --> <reference id="ref.mysql"> <title>MySQL º¯Êý¿â</title> <titleabbrev>MySQL</titleabbrev> @@ -26,56 +26,67 @@ </para> </section> - &reference.mysql.configure; + &reference.mysql.configure; - &reference.mysql.ini; - - <section id="mysql.resources"> - &reftitle.resources; - <para> - ÔÚ MySQL Ä£¿éÖÐʹÓÃÁËÁ½ÖÖ×ÊÔ´ÀàÐÍ¡£µÚÒ»ÖÖÊÇÊý¾Ý¿âµÄÁ¬½Ó¾ä±ú£¬µÚ¶þÖÖÊÇ SQL ²éѯ·µ»ØµÄ½á¹û¼¯¡£ - </para> - </section> + &reference.mysql.ini; + <section id="mysql.resources"> + &reftitle.resources; + <para> + ÔÚ MySQL Ä£¿éÖÐʹÓÃÁËÁ½ÖÖ×ÊÔ´ÀàÐÍ¡£µÚÒ»ÖÖÊÇÊý¾Ý¿âµÄÁ¬½Ó¾ä±ú£¬µÚ¶þÖÖÊÇ SQL ²éѯ·µ»ØµÄ½á¹û¼¯¡£ + </para> + </section> &reference.mysql.constants; - + <section id="mysql.notes"> + &reftitle.notes; + <note> + <para> + ´ó¶àÊý MySQL º¯Êý¶¼½ÓÊÜ + <parameter>link_identifier</parameter> + ×÷Ϊ×îºóÒ»¸ö¿ÉÑ¡²ÎÊý¡£Èç¹ûδÌṩ´Ë²ÎÊý£¬ÔòʹÓÃ×îºóÒ»¸ö´ò¿ªµÄÁ¬½Ó¡£Èç¹û²»´æÔÚÁ¬½Ó£¬Ôò»áÓà + &php.ini; Öж¨ÒåµÄĬÈϲÎÊýÈ¥³¢ÊÔ½¨Á¢Á¬½Ó¡£Èç¹ûÁ¬½Ó²»³É¹¦£¬º¯Êý·µ»Ø &false;¡£ + </para> + </note> + </section> + <section id="mysql.examples"> &reftitle.examples; <para> - Õâ¸ö¼òµ¥µÄÀý×ÓÑÝʾÈçºÎÁ¬½ÓÊý¾Ý¿â£¬Ö´ÐвéѯÓï¾ä£¬´òÓ¡·µ»Ø½á¹û¼¯ºÍ¶Ï¿ªÊý¾Ý¿âµÈһϵÁлù±¾µÄ MySQL ²Ù×÷¡£ + Õâ¸ö¼òµ¥µÄÀý×ÓÑÝʾÈçºÎÁ¬½ÓÊý¾Ý¿â£¬Ö´ÐвéѯÓï¾ä£¬´òÓ¡·µ»Ø½á¹û¼¯ºÍ¶Ï¿ªÊý¾Ý¿âµÈһϵÁлù±¾µÄ + MySQL ²Ù×÷¡£ <example> <title>MySQL À©Õ¹·¶Àý</title> <programlisting role="php"> <![CDATA[ <?php - /* Á¬½ÓÑ¡ÔñÊý¾Ý¿â */ - $link = mysql_connect("mysql_host", "mysql_user", "mysql_password") - or die("Could not connect : " . mysql_error()); - print "Connected successfully"; - mysql_select_db("my_database") or die("Could not select database"); - - /* Ö´ÐÐ SQL ²éѯ */ - $query = "SELECT * FROM my_table"; - $result = mysql_query($query) or die("Query failed : " . mysql_error()); - - /* ÔÚ HTML ÖдòÓ¡½á¹û */ - print "<table>\n"; - while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) { - print "\t<tr>\n"; - foreach ($line as $col_value) { - print "\t\t<td>$col_value</td>\n"; - } - print "\t</tr>\n"; +// Connecting, selecting database +$link = mysql_connect('mysql_host', 'mysql_user', 'mysql_password') + or die('Could not connect: ' . mysql_error()); +echo 'Connected successfully'; +mysql_select_db('my_database') or die('Could not select database'); + +// Performing SQL query +$query = 'SELECT * FROM my_table'; +$result = mysql_query($query) or die('Query failed: ' . mysql_error()); + +// Printing results in HTML +echo "<table>\n"; +while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) { + echo "\t<tr>\n"; + foreach ($line as $col_value) { + echo "\t\t<td>$col_value</td>\n"; } - print "</table>\n"; + echo "\t</tr>\n"; +} +echo "</table>\n"; - /* ÊÍ·Å×ÊÔ´ */ - mysql_free_result($result); +// Free resultset +mysql_free_result($result); - /* ¶Ï¿ªÁ¬½Ó */ - mysql_close($link); +// Closing connection +mysql_close($link); ?> ]]> </programlisting>
http://cvs.php.net/diff.php/phpdoc-zh/reference/mysql/configure.xml?r1=1.5&r2=1.6&ty=u Index: phpdoc-zh/reference/mysql/configure.xml diff -u phpdoc-zh/reference/mysql/configure.xml:1.5 phpdoc-zh/reference/mysql/configure.xml:1.6 --- phpdoc-zh/reference/mysql/configure.xml:1.5 Tue Jul 22 22:21:27 2003 +++ phpdoc-zh/reference/mysql/configure.xml Wed Aug 10 20:43:19 2005 @@ -1,44 +1,117 @@ -<?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.5 $ --> -<!-- $Author: yincheng $ --> -<!-- EN-Revision: 1.7 Maintainer: Gregory Status: ready --> - <section id="mysql.installation"> - &reftitle.install; - <para id="mysql.configure"> - µ±ÄãÑ¡ÔñÁË <option role="configure">--with-mysql[=DIR]</option> - ÅäÖÃÑ¡ÏîµÄʱºò£¬Äã´ò¿ªÁË PHP ·ÃÎÊ MySQL - Êý¾Ý¿âµÄ¹¦ÄÜ¡£ +<?xml version="1.0" encoding="gb2312"?> +<!-- $Revision: 1.6 $ --> +<!-- $Author: dallas $ --> +<!-- EN-Revision: 1.13 Maintainer: dallas Status: ready --> +<!-- CREDITS: Gregory --> +<section id="mysql.installation"> + &reftitle.install; + + <para id="mysql.configure"> + ±àÒëʱ£¬Ö»ÒªÊ¹Óà + <option role="configure">--with-mysql[=DIR]</option> + ÅäÖÃÑ¡Ïî¼´¿É£¬ÆäÖпÉÑ¡µÄ + <literal>[DIR]</literal> Ö¸Ïò MySQL µÄ°²×°Ä¿Â¼¡£ + </para> + <para> + ±¾ MySQL À©Õ¹¿â²»Ö§³Ö MySQL 4.1.0 ÒÔÉϰ汾ȫ²¿¹¦ÄÜ¡£¶Ô´Ë£¬¿ÉÓà + <link linkend="ref.mysqli">MySQLi</link>¡£ + </para> + <para> + Èç¹ûҪͬʱ°²×° mysql À©Õ¹¿âºÍ mysqli À©Õ¹¿â£¬±ØÐëʹÓÃͬһ¸ö¿Í»§¶Ë¿âÒÔ±ÜÃâÈκγåÍ»¡£ + </para> + + <section id="mysql.installation.linux"> + <title>ÔÚ Linux ϵͳϰ²×°</title> + <section> + <title>PHP 4</title> + <para> + ĬÈÏ¿ªÆôÁË <option role="configure">--with-mysql</option> + Ñ¡Ïî¡£´ËĬÈÏÐÐΪ¿ÉÒÔÓà + <option role="configure">--without-mysql</option> + ÅäÖÃÑ¡ÏîÀ´½ûÖ¹¡£Èç¹ûÆôÓà MySQL ¶ø²»Ö¸¶¨°²×°Ä¿Â¼µÄ»°£¬PHP + ½«Ê¹ÓÃ°ó¶¨µÄ MySQL ¿Í»§¶ËÁ¬½Ó¿â¡£ + </para> + <para> + »¹ÓÐÆäËüÓ¦ÓóÌÐòʹÓà MySQL£¨ÀýÈç + auth-mysql£©µÄÓû§²»ÒªÓð󶨵Ŀ⣬¶øÒªÖ¸¶¨ MySQL µÄ°²×°Ä¿Â¼£¬ÈçÕâÑù£º<option + role="configure">--with-mysql=/path/to/mysql</option>¡£Õâ½«Ç¿ÖÆ + PHP ʹÓÃËæ MySQL °²×°µÄ¿Í»§¶ËÁ¬½Ó¿â£¬¾Í¿ÉÒÔ±ÜÃâÈκγåÍ»¡£ + </para> + </section> + <section> + <title>PHP 5+</title> + <para> + MySQL ĬÈÏδÆôÓã¬Ò²Ã»ÓÐ°ó¶¨µÄ MySQL ¿â¡£ÆäÔÒò¼û´Ë + <link linkend="faq.databases.mysql.php5">FAQ</link>¡£Ê¹Óà + <option role="configure">--with-mysql[=DIR]</option> + ÅäÖÃÑ¡ÏîÀ´¼ÓÈë MySQL µÄÖ§³Ö¡£¿ÉÒÔ´Ó + <ulink url="&url.mysql;">MySQL</ulink> + ÏÂÔØ<emphasis>Í·ÎļþºÍ¿â</emphasis>¡£ + </para> + </section> + </section> + + <section id="mysql.installation.windows"> + <title>ÔÚ Windows ϵͳϰ²×°</title> + <section> + <title>PHP 4</title> + <para> + PHP MySQL À©Õ¹ÒѾ±àÒëÈë PHP¡£ + </para> + </section> + <section> + <title>PHP 5+</title> + <para> + MySQL ĬÈÏδÆôÓã¬Òò´Ë±ØÐëÔÚ &php.ini; Ö줻î + <filename>php_mysql.dll</filename> ¶¯Ì¬Á¬½Ó¿â¡£´ËÍ⣬PHP + »¹ÐèÒª·ÃÎÊ MySQL ¿Í»§¶ËÁ¬½Ó¿â¡£PHP µÄ Windows + ·¢Ðаæ°üÀ¨ÁËÒ»¸ö + <filename>libmysql.dll</filename>£¬ÎªÁËÈà PHP ÄÜºÍ + MySQL ¶Ô»°£¬´ËÎļþ±ØÐë·ÅÔÚ Windows µÄϵͳ·¾¶ + <envar>PATH</envar> ÖС£ÔõÑù×ö¼û FAQ + Öеġ°<link linkend="faq.installation.addtopath">ÔõÑù°Ñ PHP + Ŀ¼¼ÓÈëµ½ Windows ·¾¶ÖÐ</link>¡±¡£¾¡¹Ü½« + <filename>libmysql.dll</filename> ¿½±´µ½ Windows + ϵͳĿ¼ÖÐÒ²¿ÉÒÔ£¨ÒòΪϵͳĿ¼ĬÈÏÔÚϵͳ·¾¶ + <envar>PATH</envar> ÖУ©£¬µ«²»ÍƼöÕâÑù×ö¡£ + </para> + <para> + Òª¼¤»îÈκΠPHP À©Õ¹¿â£¨ÀýÈç + <filename>php_mysql.dll</filename>£©£¬PHP Ö¸Áî + <link linkend="ini.extension-dir">extension_dir</link> + Òª±»ÉèΪ PHP À©Õ¹¿âËùÔÚµÄĿ¼¡£²Î¼û<link + linkend="install.windows.manual">ÊÖ¹¤ Windows + °²×°Ö¸ÄÏ</link>¡£PHP 5 Ï extension_dir ȡֵµÄÒ»¸öÀý×ÓÊÇ + <literal>c:\php\ext</literal>¡£ + </para> + <note> + <para> + Èç¹ûÆô¶¯ web ·þÎñÆ÷ʱ³öÏÖÀàËÆÈçϵĴíÎó£º<literal>"Unable + to load dynamic library './php_mysql.dll'"</literal>£¬ÕâÊÇÒòΪϵͳÕÒ²»µ½ + <filename>php_mysql.dll</filename> ºÍ£¯»ò + <filename>libmysql.dll</filename>¡£ </para> + </note> + </section> + </section> + + <section id="mysql.installation.notes"> + <title>MySQL °²×°×¢ÒâÊÂÏî</title> + <warning> <para> - PHP 4 ĬÈÏʹÓÃÁË - <option role="configure">--with-mysql</option> Ñ¡ÏÒò´ËÒª½ûÓà - MySQL ±ØÐëʹÓà - <option role="configure">--without-mysql</option>¡£ÔÚ PHP 4 ÖУ¬Èç¹ûÄãûÓÐÔÚÅäÖÃÑ¡ÏîÖÐÖ¸¶¨ - MySQL µÄ·¾¶ÐÅÏ¢£¬PHP »áʹÓÃ°ó¶¨µÄ MySQL ¿Í»§¶Ë¿â¡£ÔÚ Windows Ï£¬Ã»ÓÐÏà¹ØµÄ DLL Îļþ£¬¸ÃÄ£¿éÒѾÄÚ½¨ÔÚÁË PHP ÄÚºËÖС£Óû§Èç¹ûÔËÐÐÆäËüʹÓà - MySQL µÄÓ¦Óã¨ÀýÈçͬʱʹÓà Apache Ä£¿é»¯·½Ê½ÔËÐÐµÄ - PHP 3 ºÍ PHP 4£¬»òÕß auth-mysql Ä£¿é£©ÐèÒªÖ¸¶¨ MySQLµÄ·¾¶£º<option - role="configure">--with-mysql=/path/to/mysql</option>¡£Õâ»áÇ¿ÆÈ - PHP ʹÓà MySQL °²×°µÄ¿Í»§¶Ë¿âº¯ÊýÀ´±ÜÃâÈκγåÍ»¡£ + µ±Í¬Ê±¼ÓÔÚ±¾À©Õ¹¿âºÍ recode À©Õ¹¿âʱ PHP ¿ÉÄÜ»á±ÀÀ£¡£¸ü¶àÐÅÏ¢¼û + <link linkend="ref.recode">recode</link> À©Õ¹¿â¡£ </para> - <para> - ÔÚ PHP 5 ÖУ¬MySQL ²»ÔÙĬÈϵĿªÆô£¬MySQL ¿âÒ²²»ÔÙºÍ PHP °ó¶¨£¬ÇëÔĶÁ¸Ã <link linkend="faq.databases.mysql.php5">FAQ</link> ÒÔ»ñÈ¡¸üÏêϸµÄÐÅÏ¢¡£ + </warning> + <note> + <para> + Èç¹ûÐèÒª²»Í¬ÓÚ + <emphasis>latin</emphasis>£¨Ä¬ÈÏÖµ£©µÄ×Ö·û¼¯£¬±ØÐë°²×°ÍⲿµÄ£¨·Ç°ó¶¨µÄ£©ÒѱàÒëÈëËùÐè×Ö·û¼¯Ö§³ÖµÄ + libmysql¡£ </para> - <para> - ¸Ã MySQL À©Õ¹¿âÎÞ·¨ºÍ 4.1.0 ÒÔÉϰ汾µÄ MySQL Ò»Æð¹¤×÷¡£Õâʱ£¬ÄúÐèҪʹÓà <link linkend="ref.mysqli">MySQLi</link>¡£ - </para> - <warning> - <para> - µ±¸ÃÀ©Õ¹Ä£¿éÓë recode À©Õ¹Ä£¿é¹²Í¬Ê¹ÓõÄʱºò£¬¿ÉÄÜ»áÔì³É - <literal>PHP</literal> µÄ±ÀÀ£ºÍÆô¶¯Ê±³öÏÖÎÊÌâ¡£Çë²éѯ - <link linkend="ref.recode">recode</link> À©Õ¹»ñµÃ¸ü¶àµÄÐÅÏ¢¡£ - </para> - </warning> - <note> - <para> - Èç¹ûÄúÐèÒª³ý <emphasis>latin</emphasis>£¨Ä¬ÈÏ£©ÒÔÍâÆäËüµÄ×Ö·û¼¯£¬ÄúÐèÒª°²×°ÓÐÒѱàÒë×Ö·û¼¯Ö§³ÖµÄÍâÖã¨Î´¼¯³É£©libmysql¡£ - </para> - </note> - </section> + </note> + </section> +</section> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/diff.php/phpdoc-zh/reference/mysql/ini.xml?r1=1.2&r2=1.3&ty=u Index: phpdoc-zh/reference/mysql/ini.xml diff -u phpdoc-zh/reference/mysql/ini.xml:1.2 phpdoc-zh/reference/mysql/ini.xml:1.3 --- phpdoc-zh/reference/mysql/ini.xml:1.2 Tue May 6 03:25:38 2003 +++ phpdoc-zh/reference/mysql/ini.xml Wed Aug 10 20:43:19 2005 @@ -1,193 +1,223 @@ -<?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.2 $ --> -<!-- $Author: gregory $ --> -<!-- EN-Revision: 1.5 Maintainer: Gregory Status: ready --> +<?xml version="1.0" encoding="gb2312"?> +<!-- $Revision: 1.3 $ --> +<!-- $Author: dallas $ --> +<!-- EN-Revision: 1.13 Maintainer: Gregory Status: ready --> +<!-- CREDITS: dallas --> <section id="mysql.configuration"> &reftitle.runtime; &extension.runtime; - <para> - <table> - <title>MySQL ÅäÖÃÑ¡Ïî</title> - <tgroup cols="3"> - <thead> - <row> - <entry>Ñ¡ÏîÃû³Æ</entry> - <entry>ĬÈÏÖµ</entry> - <entry>¿É±äµÄ</entry> - </row> - </thead> - <tbody> - <row> - <entry>mysql.allow_persistent</entry> - <entry>"On"</entry> - <entry>PHP_INI_SYSTEM</entry> - </row> - <row> - <entry>mysql.max_persistent</entry> - <entry>"-1"</entry> - <entry>PHP_INI_SYSTEM</entry> - </row> - <row> - <entry>mysql.max_links</entry> - <entry>"-1"</entry> - <entry>PHP_INI_SYSTEM</entry> - </row> - <row> - <entry>mysql.default_port</entry> - <entry>NULL</entry> - <entry>PHP_INI_ALL</entry> - </row> - <row> - <entry>mysql.default_socket</entry> - <entry>NULL</entry> - <entry>PHP_INI_ALL</entry> - </row> - <row> - <entry>mysql.default_host</entry> - <entry>NULL</entry> - <entry>PHP_INI_ALL</entry> - </row> - <row> - <entry>mysql.default_user</entry> - <entry>NULL</entry> - <entry>PHP_INI_ALL</entry> - </row> - <row> - <entry>mysql.default_password</entry> - <entry>NULL</entry> - <entry>PHP_INI_ALL</entry> - </row> - <row> - <entry>mysql.connect_timeout</entry> - <entry>"0"</entry> - <entry>PHP_INI_SYSTEM</entry> - </row> - </tbody> - </tgroup> - </table> - ¸üÏêϸµÄÐÅÏ¢ÒÔ¼° PHP_INI_* ³£Á¿µÄ¶¨Ò壬Çë²Î¿¼ - <function>ini_set</function>¡£ - </para> - - &ini.descriptions.title; - - <para> - <variablelist> - - <varlistentry id="ini.mysql.allow-persistent"> - <term> - <parameter>mysql.allow_persistent</parameter> - <type>boolean</type> - </term> - <listitem> - <para> - ÊÇ·ñÔÊÐí - <link linkend="features.persistent-connections">±£³ÖÁ¬½Ó</link> - µ½ MySQL¡£ - </para> - </listitem> - </varlistentry> - - <varlistentry id="ini.mysql.max-persistent"> - <term> - <parameter>mysql.max_persistent</parameter> - <type>integer</type> - </term> - <listitem> - <para> - ÿ¸ö½ø³ÌÖÐ×î´ó±£³ÖÁ¬½ÓÊý¡£ - </para> - </listitem> - </varlistentry> - - <varlistentry id="ini.mysql.max-links"> - <term> - <parameter>mysql.max_links</parameter> - <type>integer</type> - </term> - <listitem> - <para> - ÿ¸ö½ø³ÌÖÐ×î´óµÄÁ¬½ÓÊý£¬°üÀ¨±£³ÖÁ¬½Ó¡£ - </para> - </listitem> - </varlistentry> - - <varlistentry id="ini.mysql.default-port"> - <term> - <parameter>mysql.default_port</parameter> - <type>string</type> - </term> - <listitem> - <para> - Ö¸¶¨Ä¬ÈÏÁ¬½ÓÊý¾Ý¿âµÄ TCP ¶Ë¿ÚºÅ¡£Èç¹ûûÓÐÖ¸¶¨Ä¬È϶˿ںţ¬²à˳Ðò´Ó <literal>MYSQL_TCP_PORT</literal> - »·¾³±äÁ¿£¬<filename>/etc/services</filename> ÎļþÖÐµÄ <literal>mysql-tcp</literal> - Ïî»òÕß±àÒëʱָ¶¨µÄ <literal>MYSQL_PORT</literal> ³£Á¿ÖлñµÃ¡£Win32 »·¾³ÏÂÖ»»áʹÓà - <literal>MYSQL_PORT</literal> ³£Á¿¡£ - </para> - </listitem> - </varlistentry> - - <varlistentry id="ini.mysql.default-socket"> - <term> - <parameter>mysql.default_socket</parameter> - <type>string</type> - </term> - <listitem> - <para> - µ±Ê¹Óñ¾µØÁ¬½ÓµÄʱºò£¬Ä¬È쵀 socket Ãû³Æ¡£ - </para> - </listitem> - </varlistentry> - - <varlistentry id="ini.mysql.default-host"> - <term> - <parameter>mysql.default_host</parameter> - <type>string</type> - </term> - <listitem> - <para> - ĬÈÏÁ¬½ÓµÄÊý¾Ý¿â·þÎñÆ÷µØÖ·¡£¸Ã²ÎÊý²»ÄÜÓÃÓÚ<link linkend="ini.safe-mode">°²È«Ä£Ê½</link>¡£ - </para> - </listitem> - </varlistentry> - - <varlistentry id="ini.mysql.default-user"> - <term> - <parameter>mysql.default_user</parameter> - <type>string</type> - </term> - <listitem> - <para> - ĬÈÏÁ¬½ÓÊý¾Ý¿âʱʹÓõÄÓû§Ãû¡£¸Ã²ÎÊý²»ÄÜÓÃÓÚ<link linkend="ini.safe-mode">°²È«Ä£Ê½</link>¡£ - </para> - </listitem> - </varlistentry> - <varlistentry id="ini.mysql.default-password"> - <term> - <parameter>mysql.default_password</parameter> - <type>string</type> - </term> - <listitem> - <para> - ĬÈÏÁ¬½ÓÊý¾Ý¿âʱʹÓõÄÃÜÂë¡£¸Ã²ÎÊý²»ÄÜÓÃÓÚ<link linkend="ini.safe-mode">°²È«Ä£Ê½</link>¡£ - </para> - </listitem> - </varlistentry> - - <varlistentry id="ini.mysql.connect-timeout"> - <term> - <parameter>mysql.connect_timeout</parameter> - <type>integer</type> - </term> - <listitem> - <para> - Á¬½Ó³¬Ê±ÃëÊý¡£ÔÚ Linux ÖУ¬Õâ¸ö²ÎÊýÉ趨Á˵ȺòÀ´×Ô·þÎñÆ÷µÄÏìÓ¦µÄʱ³¤¡£ - </para> - </listitem> - </varlistentry> - </variablelist> - </para> - </section> + <para> + <table> + <title>MySQL ÅäÖÃÑ¡Ïî</title> + <tgroup cols="4"> + <thead> + <row> + <entry>Ñ¡ÏîÃû³Æ</entry> + <entry>ĬÈÏÖµ</entry> + <entry>¿É±ä·¶Î§</entry> + <entry>¸üмͼ</entry> + </row> + </thead> + <tbody> + <row> + <entry>mysql.allow_persistent</entry> + <entry>"1"</entry> + <entry>PHP_INI_SYSTEM</entry> + <entry></entry> + </row> + <row> + <entry>mysql.max_persistent</entry> + <entry>"-1"</entry> + <entry>PHP_INI_SYSTEM</entry> + <entry></entry> + </row> + <row> + <entry>mysql.max_links</entry> + <entry>"-1"</entry> + <entry>PHP_INI_SYSTEM</entry> + <entry></entry> + </row> + <row> + <entry>mysql.trace_mode</entry> + <entry>"0"</entry> + <entry>PHP_INI_ALL</entry> + <entry>×Ô PHP 4.3.0 Æð¿ÉÓÃ</entry> + </row> + <row> + <entry>mysql.default_port</entry> + <entry>NULL</entry> + <entry>PHP_INI_ALL</entry> + <entry></entry> + </row> + <row> + <entry>mysql.default_socket</entry> + <entry>NULL</entry> + <entry>PHP_INI_ALL</entry> + <entry>×Ô PHP 4.0.1 Æð¿ÉÓÃ</entry> + </row> + <row> + <entry>mysql.default_host</entry> + <entry>NULL</entry> + <entry>PHP_INI_ALL</entry> + <entry></entry> + </row> + <row> + <entry>mysql.default_user</entry> + <entry>NULL</entry> + <entry>PHP_INI_ALL</entry> + <entry></entry> + </row> + <row> + <entry>mysql.default_password</entry> + <entry>NULL</entry> + <entry>PHP_INI_ALL</entry> + <entry></entry> + </row> + <row> + <entry>mysql.connect_timeout</entry> + <entry>"60"</entry> + <entry>PHP_INI_ALL</entry> + <entry>×Ô PHP 4.3.0 Æð¿ÉÓá£ÔÚ PHP <= 4.3.2 ʱΪ PHP_INI_SYSTEM</entry> + </row> + </tbody> + </tgroup> + </table> + &ini.php.constants; + </para> + + &ini.descriptions.title; + + <para> + <variablelist> + <varlistentry id="ini.mysql.allow-persistent"> + <term> + <parameter>mysql.allow_persistent</parameter> + <type>boolean</type> + </term> + <listitem> + <para> + ÊÇ·ñÔÊÐí MySQL + µÄ<link linkend="features.persistent-connections">±£³ÖÁ¬½Ó</link>¡£ + </para> + </listitem> + </varlistentry> + <varlistentry id="ini.mysql.max-persistent"> + <term> + <parameter>mysql.max_persistent</parameter> + <type>integer</type> + </term> + <listitem> + <para> + ÿ¸ö½ø³ÌÖÐ×î´óµÄ±£³ÖÁ¬½ÓÊý¡£ + </para> + </listitem> + </varlistentry> + + <varlistentry id="ini.mysql.max-links"> + <term> + <parameter>mysql.max_links</parameter> + <type>integer</type> + </term> + <listitem> + <para> + ÿ¸ö½ø³ÌÖÐ×î´óµÄÁ¬½ÓÊý£¬°üÀ¨±£³ÖÁ¬½Ó¡£ + </para> + </listitem> + </varlistentry> + + <varlistentry id="ini.mysql.trace-mode"> + <term> + <parameter>mysql.trace_mode</parameter> + <type>boolean</type> + </term> + <listitem> + <para> + ¸ú×Ùģʽ¡£µ±¼¤»î <literal>mysql.trace_mode</literal> + ʱ£¬½«»áÏÔʾ table/index + ɨÃèµÄ¾¯¸æ£¬Î´ÊͷŵĽá¹û¼¯ÒÔ¼° + SQL ´íÎó¡££¨PHP 4.3.0 Òý½ø£© + </para> + </listitem> + </varlistentry> + + <varlistentry id="ini.mysql.default-port"> + <term> + <parameter>mysql.default_port</parameter> + <type>string</type> + </term> + <listitem> + <para> + Ö¸¶¨Ä¬ÈÏÁ¬½ÓÊý¾Ý¿âµÄ TCP ¶Ë¿ÚºÅ¡£Èç¹ûûÓÐÖ¸¶¨Ä¬È϶˿ںţ¬Ôò°´Ë³Ðò´Ó + <envar>MYSQL_TCP_PORT</envar> + »·¾³±äÁ¿£¬<filename>/etc/services</filename> ÎļþÖÐµÄ <literal>mysql-tcp</literal> + Ïî»òÕß±àÒëʱָ¶¨µÄ <constant>MYSQL_PORT</constant> ³£Á¿ÖÐÈ¡µÃ¡£Win32 »·¾³ÏÂÖ»»áʹÓà + <constant>MYSQL_PORT</constant> ³£Á¿¡£ + </para> + </listitem> + </varlistentry> + + <varlistentry id="ini.mysql.default-socket"> + <term> + <parameter>mysql.default_socket</parameter> + <type>string</type> + </term> + <listitem> + <para> + µ±Ê¹Óñ¾µØÁ¬½ÓµÄʱºò£¬Ä¬È쵀 socket Ãû³Æ¡£ + </para> + </listitem> + </varlistentry> + + <varlistentry id="ini.mysql.default-host"> + <term> + <parameter>mysql.default_host</parameter> + <type>string</type> + </term> + <listitem> + <para> + ĬÈÏÁ¬½ÓµÄÊý¾Ý¿â·þÎñÆ÷µØÖ·¡£¸Ã²ÎÊý²»ÄÜÓÃÓÚ&sqlsafemode;¡£ + </para> + </listitem> + </varlistentry> + + <varlistentry id="ini.mysql.default-user"> + <term> + <parameter>mysql.default_user</parameter> + <type>string</type> + </term> + <listitem> + <para> + ĬÈÏÁ¬½ÓÊý¾Ý¿âʱʹÓõÄÓû§Ãû¡£¸Ã²ÎÊý²»ÄÜÓÃÓÚ&sqlsafemode;¡£ + </para> + </listitem> + </varlistentry> + + <varlistentry id="ini.mysql.default-password"> + <term> + <parameter>mysql.default_password</parameter> + <type>string</type> + </term> + <listitem> + <para> + ĬÈÏÁ¬½ÓÊý¾Ý¿âʱʹÓõÄÃÜÂë¡£&sqlsafemode;¡£ + </para> + </listitem> + </varlistentry> + + <varlistentry id="ini.mysql.connect-timeout"> + <term> + <parameter>mysql.connect_timeout</parameter> + <type>integer</type> + </term> + <listitem> + <para> + Á¬½Ó³¬Ê±ÃëÊý¡£ÔÚ Linux ÖУ¬Õâ¸ö²ÎÊýÉ趨Á˵ȺòÀ´×Ô·þÎñÆ÷µÄÏìÓ¦µÄʱ³¤¡£ + </para> + </listitem> + </varlistentry> + </variablelist> + </para> +</section> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/diff.php/phpdoc-zh/reference/mysql/reference.xml?r1=1.9&r2=1.10&ty=u Index: phpdoc-zh/reference/mysql/reference.xml diff -u phpdoc-zh/reference/mysql/reference.xml:1.9 phpdoc-zh/reference/mysql/reference.xml:1.10 --- phpdoc-zh/reference/mysql/reference.xml:1.9 Tue May 20 03:01:54 2003 +++ phpdoc-zh/reference/mysql/reference.xml Wed Aug 10 20:43:19 2005 @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="gb2312"?> -<!-- $Revision: 1.9 $ --> -<!-- $Author: gregory $ --> -<!-- EN-Revision: 1.16 Maintainer: Gregory Status: ready --> +<!-- $Revision: 1.10 $ --> +<!-- $Author: dallas $ --> +<!-- EN-Revision: 1.21 Maintainer: Gregory Status: ready --> <reference id="ref.mysql"> <title>MySQL º¯Êý¿â</title> <titleabbrev>MySQL</titleabbrev> @@ -26,56 +26,67 @@ </para> </section> - &reference.mysql.configure; + &reference.mysql.configure; - &reference.mysql.ini; - - <section id="mysql.resources"> - &reftitle.resources; - <para> - ÔÚ MySQL Ä£¿éÖÐʹÓÃÁËÁ½ÖÖ×ÊÔ´ÀàÐÍ¡£µÚÒ»ÖÖÊÇÊý¾Ý¿âµÄÁ¬½Ó¾ä±ú£¬µÚ¶þÖÖÊÇ SQL ²éѯ·µ»ØµÄ½á¹û¼¯¡£ - </para> - </section> + &reference.mysql.ini; + <section id="mysql.resources"> + &reftitle.resources; + <para> + ÔÚ MySQL Ä£¿éÖÐʹÓÃÁËÁ½ÖÖ×ÊÔ´ÀàÐÍ¡£µÚÒ»ÖÖÊÇÊý¾Ý¿âµÄÁ¬½Ó¾ä±ú£¬µÚ¶þÖÖÊÇ SQL ²éѯ·µ»ØµÄ½á¹û¼¯¡£ + </para> + </section> &reference.mysql.constants; - + <section id="mysql.notes"> + &reftitle.notes; + <note> + <para> + ´ó¶àÊý MySQL º¯Êý¶¼½ÓÊÜ + <parameter>link_identifier</parameter> + ×÷Ϊ×îºóÒ»¸ö¿ÉÑ¡²ÎÊý¡£Èç¹ûδÌṩ´Ë²ÎÊý£¬ÔòʹÓÃ×îºóÒ»¸ö´ò¿ªµÄÁ¬½Ó¡£Èç¹û²»´æÔÚÁ¬½Ó£¬Ôò»áÓà + &php.ini; Öж¨ÒåµÄĬÈϲÎÊýÈ¥³¢ÊÔ½¨Á¢Á¬½Ó¡£Èç¹ûÁ¬½Ó²»³É¹¦£¬º¯Êý·µ»Ø &false;¡£ + </para> + </note> + </section> + <section id="mysql.examples"> &reftitle.examples; <para> - Õâ¸ö¼òµ¥µÄÀý×ÓÑÝʾÈçºÎÁ¬½ÓÊý¾Ý¿â£¬Ö´ÐвéѯÓï¾ä£¬´òÓ¡·µ»Ø½á¹û¼¯ºÍ¶Ï¿ªÊý¾Ý¿âµÈһϵÁлù±¾µÄ MySQL ²Ù×÷¡£ + Õâ¸ö¼òµ¥µÄÀý×ÓÑÝʾÈçºÎÁ¬½ÓÊý¾Ý¿â£¬Ö´ÐвéѯÓï¾ä£¬´òÓ¡·µ»Ø½á¹û¼¯ºÍ¶Ï¿ªÊý¾Ý¿âµÈһϵÁлù±¾µÄ + MySQL ²Ù×÷¡£ <example> <title>MySQL À©Õ¹·¶Àý</title> <programlisting role="php"> <![CDATA[ <?php - /* Á¬½ÓÑ¡ÔñÊý¾Ý¿â */ - $link = mysql_connect("mysql_host", "mysql_user", "mysql_password") - or die("Could not connect : " . mysql_error()); - print "Connected successfully"; - mysql_select_db("my_database") or die("Could not select database"); - - /* Ö´ÐÐ SQL ²éѯ */ - $query = "SELECT * FROM my_table"; - $result = mysql_query($query) or die("Query failed : " . mysql_error()); - - /* ÔÚ HTML ÖдòÓ¡½á¹û */ - print "<table>\n"; - while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) { - print "\t<tr>\n"; - foreach ($line as $col_value) { - print "\t\t<td>$col_value</td>\n"; - } - print "\t</tr>\n"; +// Connecting, selecting database +$link = mysql_connect('mysql_host', 'mysql_user', 'mysql_password') + or die('Could not connect: ' . mysql_error()); +echo 'Connected successfully'; +mysql_select_db('my_database') or die('Could not select database'); + +// Performing SQL query +$query = 'SELECT * FROM my_table'; +$result = mysql_query($query) or die('Query failed: ' . mysql_error()); + +// Printing results in HTML +echo "<table>\n"; +while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) { + echo "\t<tr>\n"; + foreach ($line as $col_value) { + echo "\t\t<td>$col_value</td>\n"; } - print "</table>\n"; + echo "\t</tr>\n"; +} +echo "</table>\n"; - /* ÊÍ·Å×ÊÔ´ */ - mysql_free_result($result); +// Free resultset +mysql_free_result($result); - /* ¶Ï¿ªÁ¬½Ó */ - mysql_close($link); +// Closing connection +mysql_close($link); ?> ]]> </programlisting>