cvs: phpdoc-zh /reference/pgsql/functions pg-fetch-all.xml pg-fetch-array.xml pg-fetch-assoc.xml pg-get-notify.xml
| From: | Dallas Thunder | Date: | Fri, 28 Feb 2003 06:35:11 +0000 |
| Subject: | cvs: phpdoc-zh /reference/pgsql/functions pg-fetch-all.xml pg-fetch-array.xml pg-fetch-assoc.xml pg-get-notify.xml | ||
| Groups: | php.doc.zh | ||
| Request: | Send a blank email to doc-zh+get-1144@lists.php.net to get a copy of this message | ||
dallas Fri Feb 28 01:35:11 2003 EDT
Added files:
/phpdoc-zh/reference/pgsql/functions pg-fetch-all.xml
pg-fetch-assoc.xml
pg-get-notify.xml
Modified files:
/phpdoc-zh/reference/pgsql/functions pg-fetch-array.xml
Log:
New functions documents.
Index: phpdoc-zh/reference/pgsql/functions/pg-fetch-array.xml diff -u phpdoc-zh/reference/pgsql/functions/pg-fetch-array.xml:1.3 phpdoc-zh/reference/pgsql/functions/pg-fetch-array.xml:1.4 --- phpdoc-zh/reference/pgsql/functions/pg-fetch-array.xml:1.3 Mon Feb 24 02:50:52 2003 +++ phpdoc-zh/reference/pgsql/functions/pg-fetch-array.xml Fri Feb 28 01:35:11 2003 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="gb2312"?> -<!-- $Revision: 1.3 $ --> +<!-- $Revision: 1.4 $ --> <!-- $Author: dallas $ --> <!-- EN-Revision: 1.7 Maintainer: dallas Status: ready --> <refentry id="function.pg-fetch-array"> @@ -16,10 +16,13 @@ <methodparam choice="opt"><type>int</type><parameter>result_type</parameter></methodparam> </methodsynopsis> <para> - <function>pg_fetch_array</function> ·µ»ØÒ»¸öÓëËùÌáÈ¡µÄÐУ¨tuples/records£©ÏàÒ»ÖµÄÊý×é¡£Èç¹ûÈç¹ûûÓиü¶àÐпɹ©ÌáÈ¡£¬Ôò·µ»Ø &false;¡£ + <function>pg_fetch_array</function> + ·µ»ØÒ»¸öÓëËùÌáÈ¡µÄÐУ¨Ôª×é/¼Ç¼£©ÏàÒ»ÖµÄÊý×é¡£Èç¹ûûÓиü¶àÐпɹ©ÌáÈ¡£¬Ôò·µ»Ø + &false;¡£ </para> <para> - <function>pg_fetch_array</function> ÊÇ <function>pg_fetch_row</function> µÄÀ©Õ¹°æ±¾¡£ÔÚ·µ»ØµÄÊý×éÖв»½öÒÔÊý×ÖË÷Òý·½Ê½´æ·ÅÊý¾Ý£¨×ֶαàºÅ£©£¬Ä¬ÈÏÇé¿öÏ»¹ÓÃ×Ö¶ÎÃû×öË÷Òý´æ·ÅÊý¾Ý£¨×Ö¶ÎÃû£©¡£ + <function>pg_fetch_array</function> ÊÇ <function>pg_fetch_row</function> + µÄÀ©Õ¹°æ±¾¡£ÔÚ·µ»ØµÄÊý×éÖв»½öÒÔÊý×ÖË÷Òý·½Ê½´æ·ÅÊý¾Ý£¨×ֶαàºÅ£©£¬Ä¬ÈÏÇé¿öÏ»¹ÓÃ×Ö¶ÎÃû×öË÷Òý´æ·ÅÊý¾Ý£¨×Ö¶ÎÃû£©¡£ </para> <para> <parameter>row</parameter> ÊÇÏëҪȡµÃµÄÐУ¨¼Ç¼£©µÄ±àºÅ¡£µÚÒ»ÐÐΪ 0¡£ Index: phpdoc-zh/reference/pgsql/functions/pg-fetch-all.xml +++ phpdoc-zh/reference/pgsql/functions/pg-fetch-all.xml <?xml version="1.0" encoding="gb2312"?> <!-- $Revision: 1.1 $ --> <!-- $Author: dallas $ --> <!-- EN-Revision: 1.1 Maintainer: dallas Status: ready --> <refentry id="function.pg-fetch-all"> <refnamediv> <refname>pg_fetch_all</refname> <refpurpose>ÌáȡһÐÐ×÷ΪÊý×é</refpurpose> </refnamediv> <refsect1> <title>˵Ã÷</title> <methodsynopsis> <type>array</type><methodname>pg_fetch_all</methodname> <methodparam><type>resource</type><parameter>result</parameter></methodparam> <methodparam choice="opt"><type>int</type><parameter>row</parameter></methodparam> </methodsynopsis> <para> <function>pg_fetch_all</function> ´Ó½á¹û×ÊÔ´Öзµ»ØÒ»¸ö°üº¬ÓÐËùÓеÄÐУ¨Ôª×é/¼Ç¼£©µÄÊý×é¡£Èç¹ûûÓиü¶àÐпɹ©ÌáÈ¡£¬Ôò·µ»Ø &false;¡£ </para> <para> ²Î¼û <function>pg_fetch_row</function>£¬<function>pg_fetch_array</function>£¬<function>pg_fetch_object</function> ºÍ <function>pg_fetch_result</function>¡£ </para> <para> <example> <title>PostgreSQL fetch array</title> <programlisting role="php"> <![CDATA[ <?php $conn = pg_pconnect ("dbname=publisher"); if (!$conn) { echo "An error occured.\n"; exit; } $result = pg_query ($conn, "SELECT * FROM authors"); if (!$result) { echo "An error occured.\n"; exit; } $arr = pg_fetch_all ($result, 0, PGSQL_NUM); var_dump($arr); ?> ]]> </programlisting> </example> </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/pgsql/functions/pg-fetch-assoc.xml +++ phpdoc-zh/reference/pgsql/functions/pg-fetch-assoc.xml <?xml version="1.0" encoding="gb2312"?> <!-- $Revision: 1.1 $ --> <!-- $Author: dallas $ --> <!-- EN-Revision: 1.4 Maintainer: dallas Status: ready --> <refentry id="function.pg-fetch-assoc"> <refnamediv> <refname>pg_fetch_assoc</refname> <refpurpose>ÌáȡһÐÐ×÷ΪÊý×é</refpurpose> </refnamediv> <refsect1> <title>˵Ã÷</title> <methodsynopsis> <type>array</type><methodname>pg_fetch_assoc</methodname> <methodparam><type>resource</type><parameter>result</parameter></methodparam> <methodparam choice="opt"><type>int</type><parameter>row</parameter></methodparam> </methodsynopsis> <para> <function>pg_fetch_assoc</function> ·µ»ØÒ»¸öÓëËùÌáÈ¡µÄÐУ¨Ôª×é/¼Ç¼£©ÏàÒ»ÖµĹØÁªÊý×é¡£Èç¹ûûÓиü¶àÐпɹ©ÌáÈ¡£¬Ôò·µ»Ø &false;¡£ </para> <para> <function>pg_fetch_assoc</function> ÊÇ <function>pg_fetch_row</function> µÄÀ©Õ¹°æ±¾¡£³ýÁ˽«Êý¾Ý´æ´¢ÔÚÊý×ÖË÷Òý£¨×ֶαàºÅ£©Ö®Í⣬ĬÈÏ»¹½«Êý×é´æ´¢ÔÚ¹ØÁªË÷Òý£¨×Ö¶ÎÃû£©ÖС£ </para> <para> <parameter>row</parameter> ÊÇÒª±»ÌáÈ¡µÄÐУ¨¼Ç¼£©±àºÅ¡£µÚÒ»ÐÐΪ 0¡£ </para> <para> <function>pg_fetch_assoc</function> ²¢²»Ã÷ÏÔ±È <function>pg_fetch_row</function> Âý£¬¶øÇÒ»¹ÏÔÖø¸ü±ãÓÚʹÓᣠ</para> <para> <example> <title>PostgreSQL fetch array</title> <programlisting role="php"> <![CDATA[ <?php $conn = pg_pconnect ("dbname=publisher"); if (!$conn) { echo "An error occured.\n"; exit; } $result = pg_query ($conn, "SELECT * FROM authors"); if (!$result) { echo "An error occured.\n"; exit; } $arr = pg_fetch_assoc ($result, 1, PGSQL_ASSOC); echo $arr["author"] . " <- array\n"; ?> ]]> </programlisting> </example> </para> <para> ²Î¼û <function>pg_fetch_row</function>£¬<function>pg_fetch_array</function>£¬<function>pg_fetch_object</function> ºÍ <function>pg_fetch_result</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/pgsql/functions/pg-get-notify.xml +++ phpdoc-zh/reference/pgsql/functions/pg-get-notify.xml <?xml version="1.0" encoding="gb2312"?> <!-- $Revision: 1.1 $ --> <!-- $Author: dallas $ --> <!-- EN-Revision: 1.2 Maintainer: dallas Status: ready --> <refentry id="function.pg-get-notify"> <refnamediv> <refname>pg_get_notify</refname> <refpurpose>Ping Êý¾Ý¿âÁ¬½Ó</refpurpose> </refnamediv> <refsect1> <title>˵Ã÷</title> <methodsynopsis> <type>array</type><methodname>pg_get_notify</methodname> <methodparam><type>resource</type><parameter>connection</parameter></methodparam> <methodparam choice="opt"><type>int</type><parameter>result_type</parameter></methodparam> </methodsynopsis> <para> <function>pg_get_notify</function> È¡µÃ SQL ÃüÁî <literal>NOTIFY</literal> ·¢Ë͵Äͨ¸æÏûÏ¢¡£Òª½ÓÊÕͨ¸æÏûÏ¢£¬±ØÐë·¢ËÍ SQL ÃüÁî <literal>LISTEN</literal>¡£Èç¹ûÁ¬½ÓÖÐÓÐͨ¸æÏûÏ¢£¬ÔòÊý×é°üº¬ÏûÏ¢Ãû²¢ÇÒ·µ»Øºó¶ËµÄ PID¡£Èç¹ûûÓÐÏûÏ¢Ôò·µ»Ø &false;¡£ </para> <para> ²Î¼û <function>pg_get_pid</function>¡£ </para> <para> <example> <title>PostgreSQL NOTIFY ÏûÏ¢</title> <programlisting role="php"> <![CDATA[ <?php $conn = pg_pconnect ("dbname=publisher"); if (!$conn) { echo "An error occured.\n"; exit; } // Listen 'author_updated' message from other processes pq_query($conn, 'LISTEN author_updated;'); $notify = pg_get_notify($conn); if (!$notify) print("No messages\n"); else print_r($notify); ?> ]]> </programlisting> </example> </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/pgsql/functions/pg-fetch-array.xml diff -u phpdoc-zh/reference/pgsql/functions/pg-fetch-array.xml:1.3 phpdoc-zh/reference/pgsql/functions/pg-fetch-array.xml:1.4 --- phpdoc-zh/reference/pgsql/functions/pg-fetch-array.xml:1.3 Mon Feb 24 02:50:52 2003 +++ phpdoc-zh/reference/pgsql/functions/pg-fetch-array.xml Fri Feb 28 01:35:11 2003 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="gb2312"?> -<!-- $Revision: 1.3 $ --> +<!-- $Revision: 1.4 $ --> <!-- $Author: dallas $ --> <!-- EN-Revision: 1.7 Maintainer: dallas Status: ready --> <refentry id="function.pg-fetch-array"> @@ -16,10 +16,13 @@ <methodparam choice="opt"><type>int</type><parameter>result_type</parameter></methodparam> </methodsynopsis> <para> - <function>pg_fetch_array</function> ·µ»ØÒ»¸öÓëËùÌáÈ¡µÄÐУ¨tuples/records£©ÏàÒ»ÖµÄÊý×é¡£Èç¹ûÈç¹ûûÓиü¶àÐпɹ©ÌáÈ¡£¬Ôò·µ»Ø &false;¡£ + <function>pg_fetch_array</function> + ·µ»ØÒ»¸öÓëËùÌáÈ¡µÄÐУ¨Ôª×é/¼Ç¼£©ÏàÒ»ÖµÄÊý×é¡£Èç¹ûûÓиü¶àÐпɹ©ÌáÈ¡£¬Ôò·µ»Ø + &false;¡£ </para> <para> - <function>pg_fetch_array</function> ÊÇ <function>pg_fetch_row</function> µÄÀ©Õ¹°æ±¾¡£ÔÚ·µ»ØµÄÊý×éÖв»½öÒÔÊý×ÖË÷Òý·½Ê½´æ·ÅÊý¾Ý£¨×ֶαàºÅ£©£¬Ä¬ÈÏÇé¿öÏ»¹ÓÃ×Ö¶ÎÃû×öË÷Òý´æ·ÅÊý¾Ý£¨×Ö¶ÎÃû£©¡£ + <function>pg_fetch_array</function> ÊÇ <function>pg_fetch_row</function> + µÄÀ©Õ¹°æ±¾¡£ÔÚ·µ»ØµÄÊý×éÖв»½öÒÔÊý×ÖË÷Òý·½Ê½´æ·ÅÊý¾Ý£¨×ֶαàºÅ£©£¬Ä¬ÈÏÇé¿öÏ»¹ÓÃ×Ö¶ÎÃû×öË÷Òý´æ·ÅÊý¾Ý£¨×Ö¶ÎÃû£©¡£ </para> <para> <parameter>row</parameter> ÊÇÏëҪȡµÃµÄÐУ¨¼Ç¼£©µÄ±àºÅ¡£µÚÒ»ÐÐΪ 0¡£ Index: phpdoc-zh/reference/pgsql/functions/pg-fetch-all.xml +++ phpdoc-zh/reference/pgsql/functions/pg-fetch-all.xml <?xml version="1.0" encoding="gb2312"?> <!-- $Revision: 1.1 $ --> <!-- $Author: dallas $ --> <!-- EN-Revision: 1.1 Maintainer: dallas Status: ready --> <refentry id="function.pg-fetch-all"> <refnamediv> <refname>pg_fetch_all</refname> <refpurpose>ÌáȡһÐÐ×÷ΪÊý×é</refpurpose> </refnamediv> <refsect1> <title>˵Ã÷</title> <methodsynopsis> <type>array</type><methodname>pg_fetch_all</methodname> <methodparam><type>resource</type><parameter>result</parameter></methodparam> <methodparam choice="opt"><type>int</type><parameter>row</parameter></methodparam> </methodsynopsis> <para> <function>pg_fetch_all</function> ´Ó½á¹û×ÊÔ´Öзµ»ØÒ»¸ö°üº¬ÓÐËùÓеÄÐУ¨Ôª×é/¼Ç¼£©µÄÊý×é¡£Èç¹ûûÓиü¶àÐпɹ©ÌáÈ¡£¬Ôò·µ»Ø &false;¡£ </para> <para> ²Î¼û <function>pg_fetch_row</function>£¬<function>pg_fetch_array</function>£¬<function>pg_fetch_object</function> ºÍ <function>pg_fetch_result</function>¡£ </para> <para> <example> <title>PostgreSQL fetch array</title> <programlisting role="php"> <![CDATA[ <?php $conn = pg_pconnect ("dbname=publisher"); if (!$conn) { echo "An error occured.\n"; exit; } $result = pg_query ($conn, "SELECT * FROM authors"); if (!$result) { echo "An error occured.\n"; exit; } $arr = pg_fetch_all ($result, 0, PGSQL_NUM); var_dump($arr); ?> ]]> </programlisting> </example> </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/pgsql/functions/pg-fetch-assoc.xml +++ phpdoc-zh/reference/pgsql/functions/pg-fetch-assoc.xml <?xml version="1.0" encoding="gb2312"?> <!-- $Revision: 1.1 $ --> <!-- $Author: dallas $ --> <!-- EN-Revision: 1.4 Maintainer: dallas Status: ready --> <refentry id="function.pg-fetch-assoc"> <refnamediv> <refname>pg_fetch_assoc</refname> <refpurpose>ÌáȡһÐÐ×÷ΪÊý×é</refpurpose> </refnamediv> <refsect1> <title>˵Ã÷</title> <methodsynopsis> <type>array</type><methodname>pg_fetch_assoc</methodname> <methodparam><type>resource</type><parameter>result</parameter></methodparam> <methodparam choice="opt"><type>int</type><parameter>row</parameter></methodparam> </methodsynopsis> <para> <function>pg_fetch_assoc</function> ·µ»ØÒ»¸öÓëËùÌáÈ¡µÄÐУ¨Ôª×é/¼Ç¼£©ÏàÒ»ÖµĹØÁªÊý×é¡£Èç¹ûûÓиü¶àÐпɹ©ÌáÈ¡£¬Ôò·µ»Ø &false;¡£ </para> <para> <function>pg_fetch_assoc</function> ÊÇ <function>pg_fetch_row</function> µÄÀ©Õ¹°æ±¾¡£³ýÁ˽«Êý¾Ý´æ´¢ÔÚÊý×ÖË÷Òý£¨×ֶαàºÅ£©Ö®Í⣬ĬÈÏ»¹½«Êý×é´æ´¢ÔÚ¹ØÁªË÷Òý£¨×Ö¶ÎÃû£©ÖС£ </para> <para> <parameter>row</parameter> ÊÇÒª±»ÌáÈ¡µÄÐУ¨¼Ç¼£©±àºÅ¡£µÚÒ»ÐÐΪ 0¡£ </para> <para> <function>pg_fetch_assoc</function> ²¢²»Ã÷ÏÔ±È <function>pg_fetch_row</function> Âý£¬¶øÇÒ»¹ÏÔÖø¸ü±ãÓÚʹÓᣠ</para> <para> <example> <title>PostgreSQL fetch array</title> <programlisting role="php"> <![CDATA[ <?php $conn = pg_pconnect ("dbname=publisher"); if (!$conn) { echo "An error occured.\n"; exit; } $result = pg_query ($conn, "SELECT * FROM authors"); if (!$result) { echo "An error occured.\n"; exit; } $arr = pg_fetch_assoc ($result, 1, PGSQL_ASSOC); echo $arr["author"] . " <- array\n"; ?> ]]> </programlisting> </example> </para> <para> ²Î¼û <function>pg_fetch_row</function>£¬<function>pg_fetch_array</function>£¬<function>pg_fetch_object</function> ºÍ <function>pg_fetch_result</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/pgsql/functions/pg-get-notify.xml +++ phpdoc-zh/reference/pgsql/functions/pg-get-notify.xml <?xml version="1.0" encoding="gb2312"?> <!-- $Revision: 1.1 $ --> <!-- $Author: dallas $ --> <!-- EN-Revision: 1.2 Maintainer: dallas Status: ready --> <refentry id="function.pg-get-notify"> <refnamediv> <refname>pg_get_notify</refname> <refpurpose>Ping Êý¾Ý¿âÁ¬½Ó</refpurpose> </refnamediv> <refsect1> <title>˵Ã÷</title> <methodsynopsis> <type>array</type><methodname>pg_get_notify</methodname> <methodparam><type>resource</type><parameter>connection</parameter></methodparam> <methodparam choice="opt"><type>int</type><parameter>result_type</parameter></methodparam> </methodsynopsis> <para> <function>pg_get_notify</function> È¡µÃ SQL ÃüÁî <literal>NOTIFY</literal> ·¢Ë͵Äͨ¸æÏûÏ¢¡£Òª½ÓÊÕͨ¸æÏûÏ¢£¬±ØÐë·¢ËÍ SQL ÃüÁî <literal>LISTEN</literal>¡£Èç¹ûÁ¬½ÓÖÐÓÐͨ¸æÏûÏ¢£¬ÔòÊý×é°üº¬ÏûÏ¢Ãû²¢ÇÒ·µ»Øºó¶ËµÄ PID¡£Èç¹ûûÓÐÏûÏ¢Ôò·µ»Ø &false;¡£ </para> <para> ²Î¼û <function>pg_get_pid</function>¡£ </para> <para> <example> <title>PostgreSQL NOTIFY ÏûÏ¢</title> <programlisting role="php"> <![CDATA[ <?php $conn = pg_pconnect ("dbname=publisher"); if (!$conn) { echo "An error occured.\n"; exit; } // Listen 'author_updated' message from other processes pq_query($conn, 'LISTEN author_updated;'); $notify = pg_get_notify($conn); if (!$notify) print("No messages\n"); else print_r($notify); ?> ]]> </programlisting> </example> </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 -->