cvs: phpdoc /en/reference/mysql/functions mysql-affected-rows.xml mysql-change-user.xml mysql-client-encoding.xml mysql-close.xml mysql-connect.xml
mysql-create-db.xml mysql-data-seek.xml mysql-db-name.xml mysql-db-query.xml mysql-drop-db.xml mysql-errno.xml mysql-error.xml mysql-fetch-array.xml
mysql-fetch-assoc.xml mysql-fetch-field.xml mysql-fetch-lengths.xml mysql-fetch-object.xml mysql-fetch-row.xml mysql-field-flags.xml
mysql-field-len.xml mysql-field-name.xml mysql-field-seek.xml mysql-field-table.xml mysql-field-type.xml mysql-free-result.xml
mysql-get-client-info.xml mysql-get-host-info.xml mysql-get-proto-info.xml mysql-get-server-info.xml mysql-info.xml mysql-insert-id.xml
mysql-list-dbs.xml mysql-list-fields.xml mysql-list-processes.xml mysql-list-tables.xml mysql-num-fields.xml mysql-num-rows.xml mysql-pconnect.xml
mysql-ping.xml mysql-query.xml mysql-real-escape-string.xml mysql-result.xml mysql-select-db.xml mysql-stat.xml mysql-tablename.xml
mysql-thread-id.xml mysql-unbuffered-query.xml

From: Date: Thu, 31 Mar 2005 07:47:26 +0000
Subject: cvs: phpdoc /en/reference/mysql/functions mysql-affected-rows.xml mysql-change-user.xml mysql-client-encoding.xml mysql-close.xml mysql-connect.xml
mysql-create-db.xml mysql-data-seek.xml mysql-db-name.xml mysql-db-query.xml mysql-drop-db.xml mysql-errno.xml mysql-error.xml mysql-fetch-array.xml
mysql-fetch-assoc.xml mysql-fetch-field.xml mysql-fetch-lengths.xml mysql-fetch-object.xml mysql-fetch-row.xml mysql-field-flags.xml
mysql-field-len.xml mysql-field-name.xml mysql-field-seek.xml mysql-field-table.xml mysql-field-type.xml mysql-free-result.xml
mysql-get-client-info.xml mysql-get-host-info.xml mysql-get-proto-info.xml mysql-get-server-info.xml mysql-info.xml mysql-insert-id.xml
mysql-list-dbs.xml mysql-list-fields.xml mysql-list-processes.xml mysql-list-tables.xml mysql-num-fields.xml mysql-num-rows.xml mysql-pconnect.xml
mysql-ping.xml mysql-query.xml mysql-real-escape-string.xml mysql-result.xml mysql-select-db.xml mysql-stat.xml mysql-tablename.xml
mysql-thread-id.xml mysql-unbuffered-query.xml
Groups: php.doc 
Request: Send a blank email to phpdoc+get-969367172@lists.php.net to get a copy of this message
philip Thu Mar 31 02:47:26 2005 EDT Modified files: /phpdoc/en/reference/mysql/functions mysql-affected-rows.xml mysql-change-user.xml mysql-client-encoding.xml mysql-close.xml mysql-connect.xml mysql-create-db.xml mysql-data-seek.xml mysql-db-name.xml mysql-db-query.xml mysql-drop-db.xml mysql-errno.xml mysql-error.xml mysql-fetch-array.xml mysql-fetch-assoc.xml mysql-fetch-field.xml mysql-fetch-lengths.xml mysql-fetch-object.xml mysql-fetch-row.xml mysql-field-flags.xml mysql-field-len.xml mysql-field-name.xml mysql-field-seek.xml mysql-field-table.xml mysql-field-type.xml mysql-free-result.xml mysql-get-client-info.xml mysql-get-host-info.xml mysql-get-proto-info.xml mysql-get-server-info.xml mysql-info.xml mysql-insert-id.xml mysql-list-dbs.xml mysql-list-fields.xml mysql-list-processes.xml mysql-list-tables.xml mysql-num-fields.xml mysql-num-rows.xml mysql-pconnect.xml mysql-ping.xml mysql-query.xml mysql-real-escape-string.xml mysql-result.xml mysql-select-db.xml mysql-stat.xml mysql-tablename.xml mysql-thread-id.xml mysql-unbuffered-query.xml Log: Implemented new doc style, implemented new entities, and rewording where appropriate.

http://cvs.php.net/diff.php/phpdoc/en/reference/mysql/functions/mysql-affected-rows.xml?r1=1.20&r2=1.21&ty=u Index: phpdoc/en/reference/mysql/functions/mysql-affected-rows.xml diff -u phpdoc/en/reference/mysql/functions/mysql-affected-rows.xml:1.20 phpdoc/en/reference/mysql/functions/mysql-affected-rows.xml:1.21 --- phpdoc/en/reference/mysql/functions/mysql-affected-rows.xml:1.20 Wed Mar 30 00:05:08 2005 +++ phpdoc/en/reference/mysql/functions/mysql-affected-rows.xml Thu Mar 31 02:47:25 2005 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.20 $ --> +<!-- $Revision: 1.21 $ --> <refentry id="function.mysql-affected-rows"> <refnamediv> <refname>mysql_affected_rows</refname> @@ -22,12 +22,7 @@ &reftitle.parameters; <para> <variablelist> - <varlistentry> - <term><parameter>link_identifier</parameter></term> - <listitem> - &mysql.linkid.description; - </listitem> - </varlistentry> + &mysql.linkid.description; </variablelist> </para> </refsect1> http://cvs.php.net/diff.php/phpdoc/en/reference/mysql/functions/mysql-change-user.xml?r1=1.5&r2=1.6&ty=u Index: phpdoc/en/reference/mysql/functions/mysql-change-user.xml diff -u phpdoc/en/reference/mysql/functions/mysql-change-user.xml:1.5 phpdoc/en/reference/mysql/functions/mysql-change-user.xml:1.6 --- phpdoc/en/reference/mysql/functions/mysql-change-user.xml:1.5 Wed Mar 30 00:05:08 2005 +++ phpdoc/en/reference/mysql/functions/mysql-change-user.xml Thu Mar 31 02:47:25 2005 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.5 $ --> +<!-- $Revision: 1.6 $ --> <refentry id="function.mysql-change-user"> <refnamediv> <refname>mysql_change_user</refname> @@ -57,12 +57,7 @@ </para> </listitem> </varlistentry> - <varlistentry> - <term><parameter>link_identifier</parameter></term> - <listitem> - &mysql.linkid.description; - </listitem> - </varlistentry> + &mysql.linkid.description; </variablelist> </para> </refsect1> http://cvs.php.net/diff.php/phpdoc/en/reference/mysql/functions/mysql-client-encoding.xml?r1=1.8&r2=1.9&ty=u Index: phpdoc/en/reference/mysql/functions/mysql-client-encoding.xml diff -u phpdoc/en/reference/mysql/functions/mysql-client-encoding.xml:1.8 phpdoc/en/reference/mysql/functions/mysql-client-encoding.xml:1.9 --- phpdoc/en/reference/mysql/functions/mysql-client-encoding.xml:1.8 Wed Mar 30 00:05:08 2005 +++ phpdoc/en/reference/mysql/functions/mysql-client-encoding.xml Thu Mar 31 02:47:25 2005 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.8 $ --> +<!-- $Revision: 1.9 $ --> <refentry id="function.mysql-client-encoding"> <refnamediv> <refname>mysql_client_encoding</refname> @@ -21,12 +21,7 @@ &reftitle.parameters; <para> <variablelist> - <varlistentry> - <term><parameter>link_identifier</parameter></term> - <listitem> - &mysql.linkid.description; - </listitem> - </varlistentry> + &mysql.linkid.description; </variablelist> </para> </refsect1> http://cvs.php.net/diff.php/phpdoc/en/reference/mysql/functions/mysql-close.xml?r1=1.10&r2=1.11&ty=u Index: phpdoc/en/reference/mysql/functions/mysql-close.xml diff -u phpdoc/en/reference/mysql/functions/mysql-close.xml:1.10 phpdoc/en/reference/mysql/functions/mysql-close.xml:1.11 --- phpdoc/en/reference/mysql/functions/mysql-close.xml:1.10 Wed Mar 30 00:05:08 2005 +++ phpdoc/en/reference/mysql/functions/mysql-close.xml Thu Mar 31 02:47:25 2005 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.10 $ --> +<!-- $Revision: 1.11 $ --> <refentry id="function.mysql-close"> <refnamediv> <refname>mysql_close</refname> @@ -31,12 +31,7 @@ &reftitle.parameters; <para> <variablelist> - <varlistentry> - <term><parameter>link_identifier</parameter></term> - <listitem> - &mysql.linkid.description; - </listitem> - </varlistentry> + &mysql.linkid.description; </variablelist> </para> </refsect1> http://cvs.php.net/diff.php/phpdoc/en/reference/mysql/functions/mysql-connect.xml?r1=1.14&r2=1.15&ty=u Index: phpdoc/en/reference/mysql/functions/mysql-connect.xml diff -u phpdoc/en/reference/mysql/functions/mysql-connect.xml:1.14 phpdoc/en/reference/mysql/functions/mysql-connect.xml:1.15 --- phpdoc/en/reference/mysql/functions/mysql-connect.xml:1.14 Wed Mar 30 20:28:41 2005 +++ phpdoc/en/reference/mysql/functions/mysql-connect.xml Thu Mar 31 02:47:25 2005 @@ -1,13 +1,13 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.14 $ --> -<!-- splitted from ./en/functions/mysql.xml, last change in rev 1.2 --> +<!-- $Revision: 1.15 $ --> <refentry id="function.mysql-connect"> <refnamediv> <refname>mysql_connect</refname> <refpurpose>Open a connection to a MySQL Server</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>resource</type><methodname>mysql_connect</methodname> <methodparam choice="opt"><type>string</type><parameter>server</parameter></methodparam> @@ -17,73 +17,130 @@ <methodparam choice="opt"><type>int</type><parameter>client_flags</parameter></methodparam> </methodsynopsis> <para> - Returns a MySQL link identifier on success, or &false; on failure. + Opens or reuses a connection to a MySQL server. The link to the server will + be closed as soon as the execution of the script ends, unless it's closed + earlier by explicitly calling <function>mysql_close</function>. </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; <para> - <function>mysql_connect</function> establishes a connection - to a MySQL server. The following defaults are assumed for - missing optional parameters: <parameter>server</parameter> = - 'localhost:3306', <parameter>username</parameter> = name of the - user that owns the server process and - <parameter>password</parameter> = empty password. - </para> - <para> - The <parameter>server</parameter> parameter can also include a port - number. e.g. &quot;hostname:port&quot; or a path to a local socket - e.g. &quot;:/path/to/socket&quot; for the localhost. - <note> - <para> - Whenever you specify &quot;localhost&quot; or - &quot;localhost:port&quot; as server, the MySQL client library will - override this and try to connect to a local socket (named pipe on - Windows). If you want to use TCP/IP, use &quot;127.0.0.1&quot; - instead of &quot;localhost&quot;. If the MySQL client library tries to - connect to the wrong local socket, you should set the correct path as - mysql.default_host in your PHP configuration and leave the server field - blank. - </para> - <para> - Support for &quot;:port&quot; was added in PHP 3.0B4. - </para> - <para> - Support for &quot;:/path/to/socket&quot; was added in - PHP 3.0.10. - </para> - <para> - You can suppress the error message on failure by prepending - a <link linkend="language.operators.errorcontrol">@</link> - to the function name. - </para> - </note> - </para> - <para> - If a second call is made to <function>mysql_connect</function> - with the same arguments, no new link will be established, but - instead, the link identifier of the already opened link will be - returned. The <parameter>new_link</parameter> parameter modifies this - behavior and makes <function>mysql_connect</function> always open - a new link, even if <function>mysql_connect</function> was called - before with the same parameters. The <parameter>client_flags</parameter> - parameter can be a combination of the constants - <constant>MYSQL_CLIENT_COMPRESS</constant>, - <constant>MYSQL_CLIENT_IGNORE_SPACE</constant> or - <constant>MYSQL_CLIENT_INTERACTIVE</constant>. + <variablelist> + <varlistentry> + <term><parameter>server</parameter></term> + <listitem> + <para> + The MySQL server. It can also include a port number. e.g. + "hostname:port" or a path to a local socket e.g. ":/path/to/socket" for + the localhost. + </para> + <para> + If the PHP directive <link linkend="ini.mysql.default-host"> + mysql.default_host</link> is undefined (default), then the default + value is 'localhost:3306' + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>username</parameter></term> + <listitem> + <para> + The username. Default value is the name of the user that owns the + server process. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>password</parameter></term> + <listitem> + <para> + The password. Default value is an empty password. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>new_link</parameter></term> + <listitem> + <para> + If a second call is made to <function>mysql_connect</function> + with the same arguments, no new link will be established, but + instead, the link identifier of the already opened link will be + returned. The <parameter>new_link</parameter> parameter modifies this + behavior and makes <function>mysql_connect</function> always open + a new link, even if <function>mysql_connect</function> was called + before with the same parameters. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>client_flags</parameter></term> + <listitem> + <para> + The <parameter>client_flags</parameter> parameter can be a combination + of the following constants: + <constant>MYSQL_CLIENT_COMPRESS</constant>, + <constant>MYSQL_CLIENT_IGNORE_SPACE</constant> or + <constant>MYSQL_CLIENT_INTERACTIVE</constant>. + </para> + </listitem> + </varlistentry> + </variablelist> </para> - <note> - <para> - The <parameter>new_link</parameter> parameter became available - in PHP 4.2.0 - </para> - <para> - The <parameter>client_flags</parameter> parameter became available in - PHP 4.3.0 - </para> - </note> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; <para> - The link to the server will be closed as soon as the execution of - the script ends, unless it's closed earlier by explicitly calling - <function>mysql_close</function>. + Returns a MySQL link identifier on success, or &false; on failure. </para> + </refsect1> + + <refsect1 role="changelog"> + &reftitle.changelog; + <para> + <informaltable> + <tgroup cols="2"> + <thead> + <row> + <entry>&Version;</entry> + <entry>&Description;</entry> + </row> + </thead> + <tbody> + <row> + <entry>4.3.0</entry> + <entry> + Added the <parameter>client_flags</parameter> parameter. + </entry> + </row> + <row> + <entry>4.2.0</entry> + <entry> + Added the <parameter>new_link</parameter> parameter. + </entry> + </row> + <row> + <entry>3.0.10</entry> + <entry> + Added support for ":/path/to/socket" with + <parameter>server</parameter>. + </entry> + </row> + <row> + <entry>3.0.0</entry> + <entry> + Added support for ":port" with <parameter>server</parameter>. + </entry> + </row> + </tbody> + </tgroup> + </informaltable> + </para> + </refsect1> + + <refsect1 role="examples"> + &reftitle.examples; <para> <example> <title><function>mysql_connect</function> example</title> @@ -101,10 +158,45 @@ </programlisting> </example> </para> - <para> - See also - <function>mysql_pconnect</function> and - <function>mysql_close</function>. + </refsect1> + + <refsect1 role="notes"> + &reftitle.notes; + <note> + <para> + Whenever you specify &quot;localhost&quot; or + &quot;localhost:port&quot; as server, the MySQL client library will + override this and try to connect to a local socket (named pipe on + Windows). If you want to use TCP/IP, use &quot;127.0.0.1&quot; + instead of &quot;localhost&quot;. If the MySQL client library tries to + connect to the wrong local socket, you should set the correct path as + mysql.default_host in your PHP configuration and leave the server field + blank. + </para> + </note> + <note> + <para> + The link to the server will be closed as soon as the execution of + the script ends, unless it's closed earlier by explicitly calling + <function>mysql_close</function>. + </para> + </note> + <note> + <para> + You can suppress the error message on failure by prepending + a <link linkend="language.operators.errorcontrol">@</link> + to the function name. + </para> + </note> + </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; + <para> + <simplelist> + <member><function>mysql_pconnect</function></member> + <member><function>mysql_close</function></member> + </simplelist> </para> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc/en/reference/mysql/functions/mysql-create-db.xml?r1=1.14&r2=1.15&ty=u Index: phpdoc/en/reference/mysql/functions/mysql-create-db.xml diff -u phpdoc/en/reference/mysql/functions/mysql-create-db.xml:1.14 phpdoc/en/reference/mysql/functions/mysql-create-db.xml:1.15 --- phpdoc/en/reference/mysql/functions/mysql-create-db.xml:1.14 Wed Mar 30 00:05:08 2005 +++ phpdoc/en/reference/mysql/functions/mysql-create-db.xml Thu Mar 31 02:47:25 2005 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.14 $ --> +<!-- $Revision: 1.15 $ --> <refentry id="function.mysql-create-db"> <refnamediv> <refname>mysql_create_db</refname> @@ -30,12 +30,7 @@ </para> </listitem> </varlistentry> - <varlistentry> - <term><parameter>link_identifier</parameter></term> - <listitem> - &mysql.linkid.description; - </listitem> - </varlistentry> + &mysql.linkid.description; </variablelist> </para> </refsect1> @@ -88,8 +83,8 @@ &reftitle.notes; <note> <para> - For downwards compatibility <function>mysql_createdb</function> - can also be used. This is deprecated, however. + &info.deprecated.alias; + <function>mysql_createdb</function> </para> </note> <note> http://cvs.php.net/diff.php/phpdoc/en/reference/mysql/functions/mysql-data-seek.xml?r1=1.16&r2=1.17&ty=u Index: phpdoc/en/reference/mysql/functions/mysql-data-seek.xml diff -u phpdoc/en/reference/mysql/functions/mysql-data-seek.xml:1.16 phpdoc/en/reference/mysql/functions/mysql-data-seek.xml:1.17 --- phpdoc/en/reference/mysql/functions/mysql-data-seek.xml:1.16 Wed Mar 30 03:14:56 2005 +++ phpdoc/en/reference/mysql/functions/mysql-data-seek.xml Thu Mar 31 02:47:25 2005 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.16 $ --> +<!-- $Revision: 1.17 $ --> <refentry id="function.mysql-data-seek"> <refnamediv> <refname>mysql_data_seek</refname> @@ -9,7 +9,7 @@ &reftitle.description; <methodsynopsis> <type>bool</type><methodname>mysql_data_seek</methodname> - <methodparam><type>resource</type><parameter>result_identifier</parameter></methodparam> + <methodparam><type>resource</type><parameter>result</parameter></methodparam> <methodparam><type>int</type><parameter>row_number</parameter></methodparam> </methodsynopsis> <para> @@ -32,14 +32,7 @@ &reftitle.parameters; <para> <variablelist> - <varlistentry> - <term><parameter>result_identifier</parameter></term> - <listitem> - <para> - The MySQL result identifier that is being seeked. - </para> - </listitem> - </varlistentry> + &mysql.result.description; <varlistentry> <term><parameter>row_number</parameter></term> <listitem> http://cvs.php.net/diff.php/phpdoc/en/reference/mysql/functions/mysql-db-name.xml?r1=1.8&r2=1.9&ty=u Index: phpdoc/en/reference/mysql/functions/mysql-db-name.xml diff -u phpdoc/en/reference/mysql/functions/mysql-db-name.xml:1.8 phpdoc/en/reference/mysql/functions/mysql-db-name.xml:1.9 --- phpdoc/en/reference/mysql/functions/mysql-db-name.xml:1.8 Wed Mar 30 03:14:56 2005 +++ phpdoc/en/reference/mysql/functions/mysql-db-name.xml Thu Mar 31 02:47:25 2005 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.8 $ --> +<!-- $Revision: 1.9 $ --> <refentry id="function.mysql-db-name"> <refnamediv> <refname>mysql_db_name</refname> @@ -90,8 +90,8 @@ &reftitle.notes; <note> <para> - For backward compatibility, <function>mysql_dbname</function> is - also accepted. This is deprecated, however. + &info.deprecated.alias; + <function>mysql_dbname</function> </para> </note> </refsect1> http://cvs.php.net/diff.php/phpdoc/en/reference/mysql/functions/mysql-db-query.xml?r1=1.9&r2=1.10&ty=u Index: phpdoc/en/reference/mysql/functions/mysql-db-query.xml diff -u phpdoc/en/reference/mysql/functions/mysql-db-query.xml:1.9 phpdoc/en/reference/mysql/functions/mysql-db-query.xml:1.10 --- phpdoc/en/reference/mysql/functions/mysql-db-query.xml:1.9 Wed Mar 30 03:14:56 2005 +++ phpdoc/en/reference/mysql/functions/mysql-db-query.xml Thu Mar 31 02:47:25 2005 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.9 $ --> +<!-- $Revision: 1.10 $ --> <refentry id="function.mysql-db-query"> <refnamediv> <refname>mysql_db_query</refname> @@ -40,12 +40,7 @@ </para> </listitem> </varlistentry> - <varlistentry> - <term><parameter>link_identifier</parameter></term> - <listitem> - &mysql.linkid.description; - </listitem> - </varlistentry> + &mysql.linkid.description; </variablelist> </para> </refsect1> http://cvs.php.net/diff.php/phpdoc/en/reference/mysql/functions/mysql-drop-db.xml?r1=1.15&r2=1.16&ty=u Index: phpdoc/en/reference/mysql/functions/mysql-drop-db.xml diff -u phpdoc/en/reference/mysql/functions/mysql-drop-db.xml:1.15 phpdoc/en/reference/mysql/functions/mysql-drop-db.xml:1.16 --- phpdoc/en/reference/mysql/functions/mysql-drop-db.xml:1.15 Wed Mar 30 03:14:56 2005 +++ phpdoc/en/reference/mysql/functions/mysql-drop-db.xml Thu Mar 31 02:47:25 2005 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.15 $ --> +<!-- $Revision: 1.16 $ --> <refentry id="function.mysql-drop-db"> <refnamediv> <refname>mysql_drop_db</refname> @@ -34,12 +34,7 @@ </para> </listitem> </varlistentry> - <varlistentry> - <term><parameter>link_identifier</parameter></term> - <listitem> - &mysql.linkid.description; - </listitem> - </varlistentry> + &mysql.linkid.description; </variablelist> </para> </refsect1> @@ -87,8 +82,8 @@ </warning> <note> <para> - For downward compatibility <function>mysql_dropdb</function> - can also be used. This is also deprecated, however. + &info.deprecated.alias; + <function>mysql_dropdb</function> </para> </note> </refsect1> http://cvs.php.net/diff.php/phpdoc/en/reference/mysql/functions/mysql-errno.xml?r1=1.13&r2=1.14&ty=u Index: phpdoc/en/reference/mysql/functions/mysql-errno.xml diff -u phpdoc/en/reference/mysql/functions/mysql-errno.xml:1.13 phpdoc/en/reference/mysql/functions/mysql-errno.xml:1.14 --- phpdoc/en/reference/mysql/functions/mysql-errno.xml:1.13 Wed Mar 30 03:14:56 2005 +++ phpdoc/en/reference/mysql/functions/mysql-errno.xml Thu Mar 31 02:47:25 2005 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.13 $ --> +<!-- $Revision: 1.14 $ --> <refentry id="function.mysql-errno"> <refnamediv> <refname>mysql_errno</refname> @@ -31,12 +31,7 @@ &reftitle.parameters; <para> <variablelist> - <varlistentry> - <term><parameter>link_identifier</parameter></term> - <listitem> - &mysql.linkid.description; - </listitem> - </varlistentry> + &mysql.linkid.description; </variablelist> </para> </refsect1> http://cvs.php.net/diff.php/phpdoc/en/reference/mysql/functions/mysql-error.xml?r1=1.16&r2=1.17&ty=u Index: phpdoc/en/reference/mysql/functions/mysql-error.xml diff -u phpdoc/en/reference/mysql/functions/mysql-error.xml:1.16 phpdoc/en/reference/mysql/functions/mysql-error.xml:1.17 --- phpdoc/en/reference/mysql/functions/mysql-error.xml:1.16 Wed Mar 30 03:14:56 2005 +++ phpdoc/en/reference/mysql/functions/mysql-error.xml Thu Mar 31 02:47:25 2005 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.16 $ --> +<!-- $Revision: 1.17 $ --> <refentry id="function.mysql-error"> <refnamediv> <refname>mysql_error</refname> @@ -28,12 +28,7 @@ &reftitle.parameters; <para> <variablelist> - <varlistentry> - <term><parameter>link_identifier</parameter></term> - <listitem> - &mysql.linkid.description; - </listitem> - </varlistentry> + &mysql.linkid.description; </variablelist> </para> </refsect1> http://cvs.php.net/diff.php/phpdoc/en/reference/mysql/functions/mysql-fetch-array.xml?r1=1.21&r2=1.22&ty=u Index: phpdoc/en/reference/mysql/functions/mysql-fetch-array.xml diff -u phpdoc/en/reference/mysql/functions/mysql-fetch-array.xml:1.21 phpdoc/en/reference/mysql/functions/mysql-fetch-array.xml:1.22 --- phpdoc/en/reference/mysql/functions/mysql-fetch-array.xml:1.21 Wed Mar 30 03:14:56 2005 +++ phpdoc/en/reference/mysql/functions/mysql-fetch-array.xml Thu Mar 31 02:47:25 2005 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.21 $ --> +<!-- $Revision: 1.22 $ --> <refentry id="function.mysql-fetch-array"> <refnamediv> <refname>mysql_fetch_array</refname> @@ -22,14 +22,7 @@ &reftitle.parameters; <para> <variablelist> - <varlistentry> - <term><parameter>result</parameter></term> - <listitem> - <para> - The result that's being fetched. - </para> - </listitem> - </varlistentry> + &mysql.result.description; <varlistentry> <term><parameter>result_type</parameter></term> <listitem> http://cvs.php.net/diff.php/phpdoc/en/reference/mysql/functions/mysql-fetch-assoc.xml?r1=1.13&r2=1.14&ty=u Index: phpdoc/en/reference/mysql/functions/mysql-fetch-assoc.xml diff -u phpdoc/en/reference/mysql/functions/mysql-fetch-assoc.xml:1.13 phpdoc/en/reference/mysql/functions/mysql-fetch-assoc.xml:1.14 --- phpdoc/en/reference/mysql/functions/mysql-fetch-assoc.xml:1.13 Wed Mar 30 01:27:13 2005 +++ phpdoc/en/reference/mysql/functions/mysql-fetch-assoc.xml Thu Mar 31 02:47:25 2005 @@ -1,29 +1,39 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.13 $ --> -<!-- splitted from ./en/functions/mysql.xml, last change in rev 1.45 --> +<!-- $Revision: 1.14 $ --> <refentry id="function.mysql-fetch-assoc"> <refnamediv> <refname>mysql_fetch_assoc</refname> - <refpurpose> - Fetch a result row as an associative array - </refpurpose> + <refpurpose>Fetch a result row as an associative array</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>array</type><methodname>mysql_fetch_assoc</methodname> <methodparam><type>resource</type><parameter>result</parameter></methodparam> </methodsynopsis> <para> - Returns an associative array that corresponds to the fetched row, - or &false; if there are no more rows.</para> - <para> + Returns an associative array that corresponds to the fetched row. <function>mysql_fetch_assoc</function> is equivalent to calling <function>mysql_fetch_array</function> with MYSQL_ASSOC for the - optional second parameter. It only returns an associative array. - This is the way <function>mysql_fetch_array</function> originally - worked. If you need the numeric indices as well as the - associative, use <function>mysql_fetch_array</function>. + optional second parameter. It only returns an associative array. + </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + &mysql.result.description; + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + Returns an associative array that corresponds to the fetched row, or + &false; if there are no more rows. </para> <para> If two or more columns of the result have the same field names, @@ -34,15 +44,10 @@ See the example at the <function>mysql_fetch_array</function> description about aliases. </para> - <para> - An important thing to note is that using - <function>mysql_fetch_assoc</function> is <emphasis>not - significantly</emphasis> slower than using - <function>mysql_fetch_row</function>, while it - provides a significant added value. - </para> - &database.field-case; - &database.fetch-null; + </refsect1> + + <refsect1 role="examples"> + &reftitle.examples; <para> <example> <title>An expanded <function>mysql_fetch_assoc</function> example</title> @@ -95,13 +100,34 @@ </programlisting> </example> </para> + </refsect1> + + <refsect1 role="notes"> + &reftitle.notes; + <note> + <title>Performance</title> + <para> + An important thing to note is that using + <function>mysql_fetch_assoc</function> is <emphasis>not + significantly</emphasis> slower than using + <function>mysql_fetch_row</function>, while it + provides a significant added value. + </para> + </note> + &database.field-case; + &database.fetch-null; + </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; <para> - See also - <function>mysql_fetch_row</function>, - <function>mysql_fetch_array</function>, - <function>mysql_data_seek</function>, - <function>mysql_query</function> and - <function>mysql_error</function>. + <simplelist> + <member><function>mysql_fetch_row</function></member> + <member><function>mysql_fetch_array</function></member> + <member><function>mysql_data_seek</function></member> + <member><function>mysql_query</function></member> + <member><function>mysql_error</function></member> + </simplelist> </para> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc/en/reference/mysql/functions/mysql-fetch-field.xml?r1=1.12&r2=1.13&ty=u Index: phpdoc/en/reference/mysql/functions/mysql-fetch-field.xml diff -u phpdoc/en/reference/mysql/functions/mysql-fetch-field.xml:1.12 phpdoc/en/reference/mysql/functions/mysql-fetch-field.xml:1.13 --- phpdoc/en/reference/mysql/functions/mysql-fetch-field.xml:1.12 Wed Mar 30 01:27:13 2005 +++ phpdoc/en/reference/mysql/functions/mysql-fetch-field.xml Thu Mar 31 02:47:25 2005 @@ -1,31 +1,50 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.12 $ --> -<!-- splitted from ./en/functions/mysql.xml, last change in rev 1.2 --> +<!-- $Revision: 1.13 $ --> <refentry id="function.mysql-fetch-field"> <refnamediv> <refname>mysql_fetch_field</refname> - <refpurpose> - Get column information from a result and return as an object - </refpurpose> + <refpurpose>Get column information from a result and return as an object</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>object</type><methodname>mysql_fetch_field</methodname> <methodparam><type>resource</type><parameter>result</parameter></methodparam> <methodparam choice="opt"><type>int</type><parameter>field_offset</parameter></methodparam> </methodsynopsis> <para> - Returns an object containing field information. + Returns an object containing field information. This function can be used + to obtain information about fields in the provided query result. + </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + &mysql.result.description; + <varlistentry> + <term><parameter>field_offset</parameter></term> + <listitem> + <para> + The numerical field offset. If the field offset is not specified, the + next field that was not yet retrieved by this function is retrieved. + The <parameter>field_offset</parameter> starts at <literal>0</literal>. + </para> + </listitem> + </varlistentry> + </variablelist> </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; <para> - <function>mysql_fetch_field</function> can be used in order to - obtain information about fields in a certain query result. If - the field offset isn't specified, the next field that wasn't yet - retrieved by <function>mysql_fetch_field</function> is retrieved. + Returns an <type>object</type> containing field information. The properties + of the object are: </para> <para> - The properties of the object are: <itemizedlist> <listitem> <simpara> @@ -89,7 +108,10 @@ </listitem> </itemizedlist> </para> - &database.field-case; + </refsect1> + + <refsect1 role="examples"> + &reftitle.examples; <para> <example> <title><function>mysql_fetch_field</function> example</title> @@ -135,8 +157,19 @@ </programlisting> </example> </para> + </refsect1> + + <refsect1 role="notes"> + &reftitle.notes; + &database.field-case; + </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; <para> - See also <function>mysql_field_seek</function>. + <simplelist> + <member><function>mysql_field_seek</function></member> + </simplelist> </para> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc/en/reference/mysql/functions/mysql-fetch-lengths.xml?r1=1.8&r2=1.9&ty=u Index: phpdoc/en/reference/mysql/functions/mysql-fetch-lengths.xml diff -u phpdoc/en/reference/mysql/functions/mysql-fetch-lengths.xml:1.8 phpdoc/en/reference/mysql/functions/mysql-fetch-lengths.xml:1.9 --- phpdoc/en/reference/mysql/functions/mysql-fetch-lengths.xml:1.8 Wed Mar 30 01:27:13 2005 +++ phpdoc/en/reference/mysql/functions/mysql-fetch-lengths.xml Thu Mar 31 02:47:25 2005 @@ -1,23 +1,20 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.8 $ --> -<!-- splitted from ./en/functions/mysql.xml, last change in rev 1.2 --> +<!-- $Revision: 1.9 $ --> <refentry id="function.mysql-fetch-lengths"> <refnamediv> <refname>mysql_fetch_lengths</refname> - <refpurpose> - Get the length of each output in a result - </refpurpose> + <refpurpose>Get the length of each output in a result</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>array</type><methodname>mysql_fetch_lengths</methodname> <methodparam><type>resource</type><parameter>result</parameter></methodparam> </methodsynopsis> <para> Returns an array that corresponds to the lengths of each field - in the last row fetched by <function>mysql_fetch_row</function>, - or &false; on error. + in the last row fetched by MySQL. </para> <para> <function>mysql_fetch_lengths</function> stores the lengths of @@ -28,6 +25,26 @@ <function>mysql_fetch_object</function> in an array, starting at offset 0. </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + &mysql.result.description; + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + An <type>array</type> of lengths on success, or &false; on failure. + </para> + </refsect1> + + <refsect1 role="examples"> + &reftitle.examples; <para> <example> <title>A <function>mysql_fetch_lengths</function> example</title> @@ -64,10 +81,16 @@ </screen> </example> </para> + </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; <para> - See also <function>mysql_field_len</function>, - <function>mysql_fetch_row</function>, and - <function>strlen</function>. + <simplelist> + <member><function>mysql_field_len</function></member> + <member><function>mysql_fetch_row</function></member> + <member><function>strlen</function></member> + </simplelist> </para> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc/en/reference/mysql/functions/mysql-fetch-object.xml?r1=1.12&r2=1.13&ty=u Index: phpdoc/en/reference/mysql/functions/mysql-fetch-object.xml diff -u phpdoc/en/reference/mysql/functions/mysql-fetch-object.xml:1.12 phpdoc/en/reference/mysql/functions/mysql-fetch-object.xml:1.13 --- phpdoc/en/reference/mysql/functions/mysql-fetch-object.xml:1.12 Wed Mar 30 01:27:13 2005 +++ phpdoc/en/reference/mysql/functions/mysql-fetch-object.xml Thu Mar 31 02:47:25 2005 @@ -1,54 +1,48 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.12 $ --> -<!-- splitted from ./en/functions/mysql.xml, last change in rev 1.2 --> +<!-- $Revision: 1.13 $ --> <refentry id="function.mysql-fetch-object"> <refnamediv> <refname>mysql_fetch_object</refname> <refpurpose>Fetch a result row as an object</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>object</type><methodname>mysql_fetch_object</methodname> <methodparam><type>resource</type><parameter>result</parameter></methodparam> </methodsynopsis> <para> - Returns an object with properties that correspond to the fetched - row, or &false; if there are no more rows. + Returns an object with properties that correspond to the fetched row. </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; <para> - <function>mysql_fetch_object</function> is similar to - <function>mysql_fetch_array</function>, with one difference - an - object is returned, instead of an array. Indirectly, that means - that you can only access the data by the field names, and not by - their offsets (numbers are illegal property names). + <variablelist> + &mysql.result.description; + </variablelist> </para> - &database.field-case; - &database.fetch-null; - <para> - <example> - <title><function>mysql_fetch_object</function> example</title> - <programlisting role="php"> -<![CDATA[ -<?php - -$row = mysql_fetch_object($result); - -/* this is valid */ -echo $row->field; -/* this is invalid */ -// echo $row->0; + </refsect1> -?> -]]> - </programlisting> - </example> + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + Returns an <type>object</type> with properties that correspond to the + fetched row, or &false; if there are no more rows. + </para> + <para> + <function>mysql_fetch_row</function> fetches one row of data from + the result associated with the specified result identifier. The + row is returned as an array. Each result column is stored in an + array offset, starting at offset 0. </para> + </refsect1> + + <refsect1 role="examples"> + &reftitle.examples; <para> - Speed-wise, the function is identical to - <function>mysql_fetch_array</function>, and almost as quick as - <function>mysql_fetch_row</function> (the difference is - insignificant). <example> <title><function>mysql_fetch_object</function> example</title> <programlisting role="php"> @@ -68,12 +62,60 @@ </example> </para> <para> - See also - <function>mysql_fetch_array</function>, - <function>mysql_fetch_assoc</function>, - <function>mysql_fetch_row</function>, - <function>mysql_data_seek</function> and - <function>mysql_query</function>. + <example> + <title><function>mysql_fetch_object</function> example</title> + <programlisting role="php"> +<![CDATA[ +<?php + +$row = mysql_fetch_object($result); + +/* this is valid */ +echo $row->field; +/* this is invalid */ +// echo $row->0; + +?> +]]> + </programlisting> + </example> + </para> + </refsect1> + + <refsect1 role="notes"> + &reftitle.notes; + <note> + <title>Performance</title> + <para> + Speed-wise, the function is identical to + <function>mysql_fetch_array</function>, and almost as quick as + <function>mysql_fetch_row</function> (the difference is + insignificant). + </para> + </note> + <note> + <para> + <function>mysql_fetch_object</function> is similar to + <function>mysql_fetch_array</function>, with one difference - an + object is returned, instead of an array. Indirectly, that means + that you can only access the data by the field names, and not by + their offsets (numbers are illegal property names). + </para> + </note> + &database.field-case; + &database.fetch-null; + </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; + <para> + <simplelist> + <member><function>mysql_fetch_array</function></member> + <member><function>mysql_fetch_assoc</function></member> + <member><function>mysql_fetch_row</function></member> + <member><function>mysql_data_seek</function></member> + <member><function>mysql_query</function></member> + </simplelist> </para> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc/en/reference/mysql/functions/mysql-fetch-row.xml?r1=1.10&r2=1.11&ty=u Index: phpdoc/en/reference/mysql/functions/mysql-fetch-row.xml diff -u phpdoc/en/reference/mysql/functions/mysql-fetch-row.xml:1.10 phpdoc/en/reference/mysql/functions/mysql-fetch-row.xml:1.11 --- phpdoc/en/reference/mysql/functions/mysql-fetch-row.xml:1.10 Wed Mar 30 01:27:13 2005 +++ phpdoc/en/reference/mysql/functions/mysql-fetch-row.xml Thu Mar 31 02:47:25 2005 @@ -1,33 +1,47 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.10 $ --> -<!-- splitted from ./en/functions/mysql.xml, last change in rev 1.2 --> +<!-- $Revision: 1.11 $ --> <refentry id="function.mysql-fetch-row"> <refnamediv> <refname>mysql_fetch_row</refname> <refpurpose>Get a result row as an enumerated array</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>array</type><methodname>mysql_fetch_row</methodname> <methodparam><type>resource</type><parameter>result</parameter></methodparam> </methodsynopsis> <para> - Returns an array that corresponds to the fetched row, or &false; - if there are no more rows. + Returns a numerical array that corresponds to the fetched row. + </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + &mysql.result.description; + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + Returns an numerical array that corresponds to the fetched row, or + &false; if there are no more rows. </para> - &database.fetch-null; <para> <function>mysql_fetch_row</function> fetches one row of data from the result associated with the specified result identifier. The row is returned as an array. Each result column is stored in an array offset, starting at offset 0. </para> - <para> - Subsequent call to <function>mysql_fetch_row</function> would - return the next row in the result set, or &false; if there are no - more rows. - </para> + </refsect1> + + <refsect1 role="examples"> + &reftitle.examples; <para> <example> <title>Fetching one row with <function>mysql_fetch_row</function></title> @@ -48,14 +62,24 @@ </programlisting> </example> </para> + </refsect1> + + <refsect1 role="notes"> + &reftitle.notes; + &database.fetch-null; + </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; <para> - See also - <function>mysql_fetch_array</function>, - <function>mysql_fetch_assoc</function>, - <function>mysql_fetch_object</function>, - <function>mysql_data_seek</function>, - <function>mysql_fetch_lengths</function> and - <function>mysql_result</function>. + <simplelist> + <member><function>mysql_fetch_array</function></member> + <member><function>mysql_fetch_assoc</function></member> + <member><function>mysql_data_object</function></member> + <member><function>mysql_data_seek</function></member> + <member><function>mysql_fetch_lengths</function></member> + <member><function>mysql_result</function></member> + </simplelist> </para> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc/en/reference/mysql/functions/mysql-field-flags.xml?r1=1.8&r2=1.9&ty=u Index: phpdoc/en/reference/mysql/functions/mysql-field-flags.xml diff -u phpdoc/en/reference/mysql/functions/mysql-field-flags.xml:1.8 phpdoc/en/reference/mysql/functions/mysql-field-flags.xml:1.9 --- phpdoc/en/reference/mysql/functions/mysql-field-flags.xml:1.8 Wed Mar 30 01:27:13 2005 +++ phpdoc/en/reference/mysql/functions/mysql-field-flags.xml Thu Mar 31 02:47:25 2005 @@ -1,15 +1,13 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.8 $ --> -<!-- splitted from ./en/functions/mysql.xml, last change in rev 1.17 --> +<!-- $Revision: 1.9 $ --> <refentry id="function.mysql-field-flags"> <refnamediv> <refname>mysql_field_flags</refname> - <refpurpose> - Get the flags associated with the specified field in a result - </refpurpose> + <refpurpose>Get the flags associated with the specified field in a result</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>string</type><methodname>mysql_field_flags</methodname> <methodparam><type>resource</type><parameter>result</parameter></methodparam> @@ -21,14 +19,36 @@ per flag separated by a single space, so that you can split the returned value using <function>explode</function>. </para> - <para>The following flags are reported, if your version of MySQL + </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> + Returns a string of flags associated with the result, or &false; on failure. + </para> + <para> + The following flags are reported, if your version of MySQL is current enough to support them: <literal>"not_null"</literal>, <literal>"primary_key"</literal>, <literal>"unique_key"</literal>, <literal>"multiple_key"</literal>, <literal>"blob"</literal>, <literal>"unsigned"</literal>, <literal>"zerofill"</literal>, <literal>"binary"</literal>, <literal>"enum"</literal>, - <literal>"auto_increment"</literal> et <literal>"timestamp"</literal>. + <literal>"auto_increment"</literal> and <literal>"timestamp"</literal>. </para> + </refsect1> + + <refsect1 role="examples"> + &reftitle.examples; <para> <example> <title>A <function>mysql_field_flags</function> example</title> @@ -61,10 +81,16 @@ </screen> </example> </para> - <para> - For downward compatibility <function>mysql_fieldflags</function> - can also be used. This is deprecated, however. - </para> + </refsect1> + + <refsect1 role="notes"> + &reftitle.notes; + <note> + <para> + &info.deprecated.alias; + <function>mysql_fieldflags</function> + </para> + </note> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc/en/reference/mysql/functions/mysql-field-len.xml?r1=1.7&r2=1.8&ty=u Index: phpdoc/en/reference/mysql/functions/mysql-field-len.xml diff -u phpdoc/en/reference/mysql/functions/mysql-field-len.xml:1.7 phpdoc/en/reference/mysql/functions/mysql-field-len.xml:1.8 --- phpdoc/en/reference/mysql/functions/mysql-field-len.xml:1.7 Wed Mar 30 14:23:51 2005 +++ phpdoc/en/reference/mysql/functions/mysql-field-len.xml Thu Mar 31 02:47:25 2005 @@ -1,15 +1,13 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.7 $ --> -<!-- splitted from ./en/functions/mysql.xml, last change in rev 1.17 --> +<!-- $Revision: 1.8 $ --> <refentry id="function.mysql-field-len"> <refnamediv> <refname>mysql_field_len</refname> - <refpurpose> - Returns the length of the specified field - </refpurpose> + <refpurpose>Returns the length of the specified field</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>int</type><methodname>mysql_field_len</methodname> <methodparam><type>resource</type><parameter>result</parameter></methodparam> @@ -19,6 +17,27 @@ <function>mysql_field_len</function> returns the length of the specified field. </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> + The name of the specified field index on success, or &false; on failure. + </para> + </refsect1> + + <refsect1 role="examples"> + &reftitle.examples; <para> <example> <title><function>mysql_field_len</function> example</title> @@ -40,13 +59,25 @@ </programlisting> </example> </para> + </refsect1> + + <refsect1 role="notes"> + &reftitle.notes; + <note> + <para> + &info.deprecated.alias; + <function>mysql_fieldlen</function> + </para> + </note> + </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; <para> - For downward compatibility <function>mysql_fieldlen</function> - can also be used. This is deprecated, however. - </para> - <para> - See also <function>mysql_fetch_lengths</function> and - <function>strlen</function>. + <simplelist> + <member><function>mysql_fetch_lengths</function></member> + <member><function>strlen</function></member> + </simplelist> </para> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc/en/reference/mysql/functions/mysql-field-name.xml?r1=1.12&r2=1.13&ty=u Index: phpdoc/en/reference/mysql/functions/mysql-field-name.xml diff -u phpdoc/en/reference/mysql/functions/mysql-field-name.xml:1.12 phpdoc/en/reference/mysql/functions/mysql-field-name.xml:1.13 --- phpdoc/en/reference/mysql/functions/mysql-field-name.xml:1.12 Wed Mar 30 01:27:13 2005 +++ phpdoc/en/reference/mysql/functions/mysql-field-name.xml Thu Mar 31 02:47:25 2005 @@ -1,36 +1,43 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.12 $ --> -<!-- splitted from ./en/functions/mysql.xml, last change in rev 1.2 --> +<!-- $Revision: 1.13 $ --> <refentry id="function.mysql-field-name"> <refnamediv> <refname>mysql_field_name</refname> - <refpurpose> - Get the name of the specified field in a result - </refpurpose> + <refpurpose>Get the name of the specified field in a result</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <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> + <methodparam><type>int</type><parameter>field_offset</parameter></methodparam> </methodsynopsis> <para> <function>mysql_field_name</function> returns the name of the - specified field index. <parameter>result</parameter> must be a - valid result identifier and <parameter>field_index</parameter> is - the numerical offset of the field. + specified field index. </para> - <note> - <para> - <parameter>field_index</parameter> starts at 0. - </para> - <para> - e.g. The index of the third field would actually be 2, the index - of the fourth field would be 3 and so on. - </para> - </note> - &database.field-case; + </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> + The name of the specified field index on success, or &false; on failure. + </para> + </refsect1> + + <refsect1 role="examples"> + &reftitle.examples; <para> <example> <title><function>mysql_field_name</function> example</title> @@ -58,9 +65,7 @@ ?> ]]> </programlisting> - <para> - The above example would produce the following output: - </para> + &example.outputs; <screen> <![CDATA[ user_id @@ -69,10 +74,17 @@ </screen> </example> </para> - <para> - For downwards compatibility <function>mysql_fieldname</function> - can also be used. This is deprecated, however. - </para> + </refsect1> + + <refsect1 role="notes"> + &reftitle.notes; + &database.field-case; + <note> + <para> + &info.deprecated.alias; + <function>mysql_fieldname</function> + </para> + </note> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc/en/reference/mysql/functions/mysql-field-seek.xml?r1=1.5&r2=1.6&ty=u Index: phpdoc/en/reference/mysql/functions/mysql-field-seek.xml diff -u phpdoc/en/reference/mysql/functions/mysql-field-seek.xml:1.5 phpdoc/en/reference/mysql/functions/mysql-field-seek.xml:1.6 --- phpdoc/en/reference/mysql/functions/mysql-field-seek.xml:1.5 Wed Mar 30 01:27:13 2005 +++ phpdoc/en/reference/mysql/functions/mysql-field-seek.xml Thu Mar 31 02:47:25 2005 @@ -1,15 +1,13 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.5 $ --> -<!-- splitted from ./en/functions/mysql.xml, last change in rev 1.2 --> +<!-- $Revision: 1.6 $ --> <refentry id="function.mysql-field-seek"> <refnamediv> <refname>mysql_field_seek</refname> - <refpurpose> - Set result pointer to a specified field offset - </refpurpose> + <refpurpose>Set result pointer to a specified field offset</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>int</type><methodname>mysql_field_seek</methodname> <methodparam><type>resource</type><parameter>result</parameter></methodparam> @@ -21,8 +19,24 @@ offset, the field offset specified in <function>mysql_field_seek</function> will be returned. </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + &mysql.result.description; + &mysql.field-offset.req.description; + </variablelist> + </para> + </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; <para> - See also <function>mysql_fetch_field</function>. + <simplelist> + <member><function>mysql_fetch_field</function></member> + </simplelist> </para> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc/en/reference/mysql/functions/mysql-field-table.xml?r1=1.6&r2=1.7&ty=u Index: phpdoc/en/reference/mysql/functions/mysql-field-table.xml diff -u phpdoc/en/reference/mysql/functions/mysql-field-table.xml:1.6 phpdoc/en/reference/mysql/functions/mysql-field-table.xml:1.7 --- phpdoc/en/reference/mysql/functions/mysql-field-table.xml:1.6 Wed Mar 30 01:27:13 2005 +++ phpdoc/en/reference/mysql/functions/mysql-field-table.xml Thu Mar 31 02:47:25 2005 @@ -1,24 +1,42 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.6 $ --> -<!-- splitted from ./en/functions/mysql.xml, last change in rev 1.2 --> +<!-- $Revision: 1.7 $ --> <refentry id="function.mysql-field-table"> <refnamediv> <refname>mysql_field_table</refname> - <refpurpose> - Get name of the table the specified field is in - </refpurpose> + <refpurpose>Get name of the table the specified field is in</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <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> - Returns the name of the table that the specified field is - in. + Returns the name of the table that the specified field is in. </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> + The name of the table on success. + </para> + </refsect1> + + <refsect1 role="examples"> + &reftitle.examples; <para> <example> <title>A <function>mysql_field_table</function> example</title> @@ -39,12 +57,24 @@ </programlisting> </example> </para> + </refsect1> + + <refsect1 role="notes"> + &reftitle.notes; + <note> + <para> + &info.deprecated.alias; + <function>mysql_fieldtable</function> + </para> + </note> + </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; <para> - For downward compatibility <function>mysql_fieldtable</function> - can also be used. This is deprecated, however. - </para> - <para> - See also <function>mysql_list_tables</function>. + <simplelist> + <member><function>mysql_list_tables</function></member> + </simplelist> </para> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc/en/reference/mysql/functions/mysql-field-type.xml?r1=1.11&r2=1.12&ty=u Index: phpdoc/en/reference/mysql/functions/mysql-field-type.xml diff -u phpdoc/en/reference/mysql/functions/mysql-field-type.xml:1.11 phpdoc/en/reference/mysql/functions/mysql-field-type.xml:1.12 --- phpdoc/en/reference/mysql/functions/mysql-field-type.xml:1.11 Wed Mar 30 01:27:13 2005 +++ phpdoc/en/reference/mysql/functions/mysql-field-type.xml Thu Mar 31 02:47:25 2005 @@ -1,15 +1,13 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.11 $ --> -<!-- splitted from ./en/functions/mysql.xml, last change in rev 1.2 --> +<!-- $Revision: 1.12 $ --> <refentry id="function.mysql-field-type"> <refnamediv> <refname>mysql_field_type</refname> - <refpurpose> - Get the type of the specified field in a result - </refpurpose> + <refpurpose>Get the type of the specified field in a result</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>string</type><methodname>mysql_field_type</methodname> <methodparam><type>resource</type><parameter>result</parameter></methodparam> @@ -18,11 +16,34 @@ <para> <function>mysql_field_type</function> is similar to the <function>mysql_field_name</function> function. The arguments are - identical, but the field type is returned instead. The field type + identical, but the field type is returned instead. + </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> + The returned field type will be one of <literal>"int"</literal>, <literal>"real"</literal>, <literal>"string"</literal>, <literal>"blob"</literal>, and others as detailed in the <ulink url="&url.mysql.docs;">MySQL documentation</ulink>. + </para> + </refsect1> + + <refsect1 role="examples"> + &reftitle.examples; + <para> <example> <title><function>mysql_field_type</function> example</title> <programlisting role="php"> @@ -48,9 +69,7 @@ ?> ]]> </programlisting> - <para> - The above example would produce the following output: - </para> + &example.outputs.similar; <screen> <![CDATA[ Your 'func' table has 4 fields and 1 record(s) @@ -63,10 +82,16 @@ </screen> </example> </para> - <para> - For downward compatibility <function>mysql_fieldtype</function> - can also be used. This is deprecated, however. - </para> + </refsect1> + + <refsect1 role="notes"> + &reftitle.notes; + <note> + <para> + &info.deprecated.alias; + <function>mysql_fieldtype</function> + </para> + </note> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc/en/reference/mysql/functions/mysql-free-result.xml?r1=1.7&r2=1.8&ty=u Index: phpdoc/en/reference/mysql/functions/mysql-free-result.xml diff -u phpdoc/en/reference/mysql/functions/mysql-free-result.xml:1.7 phpdoc/en/reference/mysql/functions/mysql-free-result.xml:1.8 --- phpdoc/en/reference/mysql/functions/mysql-free-result.xml:1.7 Wed Mar 30 01:27:13 2005 +++ phpdoc/en/reference/mysql/functions/mysql-free-result.xml Thu Mar 31 02:47:25 2005 @@ -1,13 +1,13 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.7 $ --> -<!-- splitted from ./en/functions/mysql.xml, last change in rev 1.102 --> +<!-- $Revision: 1.8 $ --> <refentry id="function.mysql-free-result"> <refnamediv> <refname>mysql_free_result</refname> <refpurpose>Free result memory</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>bool</type><methodname>mysql_free_result</methodname> <methodparam><type>resource</type><parameter>result</parameter></methodparam> @@ -22,6 +22,19 @@ that return large result sets. All associated result memory is automatically freed at the end of the script's execution. </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + &mysql.result.description; + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; <para> &return.success; </para> @@ -31,6 +44,10 @@ <function>mysql_query</function> only returns a <type>resource</type> for SELECT, SHOW, EXPLAIN, and DESCRIBE queries. </para> + </refsect1> + + <refsect1 role="examples"> + &reftitle.examples; <para> <example> <title>A <function>mysql_free_result</function> example</title> @@ -55,13 +72,25 @@ </programlisting> </example> </para> + </refsect1> + + <refsect1 role="notes"> + &reftitle.notes; + <note> + <para> + &info.deprecated.alias; + <function>mysql_freeresult</function> + </para> + </note> + </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; <para> - For downward compatibility <function>mysql_freeresult</function> - can also be used. This is deprecated, however. - </para> - <para> - See also <function>mysql_query</function> and - <function>is_resource</function>. + <simplelist> + <member><function>mysql_query</function></member> + <member><function>is_resource</function></member> + </simplelist> </para> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc/en/reference/mysql/functions/mysql-get-client-info.xml?r1=1.8&r2=1.9&ty=u Index: phpdoc/en/reference/mysql/functions/mysql-get-client-info.xml diff -u phpdoc/en/reference/mysql/functions/mysql-get-client-info.xml:1.8 phpdoc/en/reference/mysql/functions/mysql-get-client-info.xml:1.9 --- phpdoc/en/reference/mysql/functions/mysql-get-client-info.xml:1.8 Wed Mar 30 01:27:13 2005 +++ phpdoc/en/reference/mysql/functions/mysql-get-client-info.xml Thu Mar 31 02:47:25 2005 @@ -1,13 +1,13 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.8 $ --> -<!-- splitted from ./en/functions/mysql.xml, last change in rev 1.62 --> +<!-- $Revision: 1.9 $ --> <refentry id="function.mysql-get-client-info"> <refnamediv> <refname>mysql_get_client_info</refname> <refpurpose>Get MySQL client info</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>string</type><methodname>mysql_get_client_info</methodname> <void/> @@ -16,6 +16,17 @@ <function>mysql_get_client_info</function> returns a string that represents the client library version. </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + The MySQL client version. + </para> + </refsect1> + + <refsect1 role="examples"> + &reftitle.examples; <para> <example> <title><function>mysql_get_client_info</function> example</title> @@ -26,9 +37,7 @@ ?> ]]> </programlisting> - <para> - The above example would produce the following output: - </para> + &example.outputs.similar; <screen> <![CDATA[ MySQL client info: 3.23.39 @@ -36,11 +45,16 @@ </screen> </example> </para> + </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; <para> - See also - <function>mysql_get_host_info</function>, - <function>mysql_get_proto_info</function> and - <function>mysql_get_server_info</function>. + <simplelist> + <member><function>mysql_get_host_info</function></member> + <member><function>mysql_get_proto_info</function></member> + <member><function>mysql_get_server_info</function></member> + </simplelist> </para> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc/en/reference/mysql/functions/mysql-get-host-info.xml?r1=1.11&r2=1.12&ty=u Index: phpdoc/en/reference/mysql/functions/mysql-get-host-info.xml diff -u phpdoc/en/reference/mysql/functions/mysql-get-host-info.xml:1.11 phpdoc/en/reference/mysql/functions/mysql-get-host-info.xml:1.12 --- phpdoc/en/reference/mysql/functions/mysql-get-host-info.xml:1.11 Wed Mar 30 01:27:13 2005 +++ phpdoc/en/reference/mysql/functions/mysql-get-host-info.xml Thu Mar 31 02:47:25 2005 @@ -1,24 +1,42 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.11 $ --> -<!-- splitted from ./en/functions/mysql.xml, last change in rev 1.62 --> +<!-- $Revision: 1.12 $ --> <refentry id="function.mysql-get-host-info"> <refnamediv> <refname>mysql_get_host_info</refname> <refpurpose>Get MySQL host info</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>string</type><methodname>mysql_get_host_info</methodname> <methodparam choice="opt"><type>resource</type><parameter>link_identifier</parameter></methodparam> </methodsynopsis> <para> - <function>mysql_get_host_info</function> returns a string - describing the type of connection in use for the connection - <parameter>link_identifier</parameter>, including the server host - name. If <parameter>link_identifier</parameter> is omitted, the - last opened connection will be used. + Describes the type of connection in use for the connection, including the + server host name. </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + &mysql.linkid.description; + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + Returns a string describing the type of MySQL connection in use for the + connection or &false; on failure. + </para> + </refsect1> + + <refsect1 role="examples"> + &reftitle.examples; <para> <example> <title><function>mysql_get_host_info</function> example</title> @@ -33,9 +51,7 @@ ?> ]]> </programlisting> - <para> - The above example would produce the following output: - </para> + &example.outputs.similar; <screen> <![CDATA[ MySQL host info: Localhost via UNIX socket @@ -43,11 +59,16 @@ </screen> </example> </para> + </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; <para> - See also - <function>mysql_get_client_info</function>, - <function>mysql_get_proto_info</function> and - <function>mysql_get_server_info</function>. + <simplelist> + <member><function>mysql_get_client_info</function></member> + <member><function>mysql_get_proto_info</function></member> + <member><function>mysql_get_server_info</function></member> + </simplelist> </para> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc/en/reference/mysql/functions/mysql-get-proto-info.xml?r1=1.12&r2=1.13&ty=u Index: phpdoc/en/reference/mysql/functions/mysql-get-proto-info.xml diff -u phpdoc/en/reference/mysql/functions/mysql-get-proto-info.xml:1.12 phpdoc/en/reference/mysql/functions/mysql-get-proto-info.xml:1.13 --- phpdoc/en/reference/mysql/functions/mysql-get-proto-info.xml:1.12 Wed Mar 30 01:27:13 2005 +++ phpdoc/en/reference/mysql/functions/mysql-get-proto-info.xml Thu Mar 31 02:47:25 2005 @@ -1,24 +1,40 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.12 $ --> -<!-- splitted from ./en/functions/mysql.xml, last change in rev 1.62 --> +<!-- $Revision: 1.13 $ --> <refentry id="function.mysql-get-proto-info"> <refnamediv> <refname>mysql_get_proto_info</refname> <refpurpose>Get MySQL protocol info</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>int</type><methodname>mysql_get_proto_info</methodname> <methodparam choice="opt"><type>resource</type><parameter>link_identifier</parameter></methodparam> </methodsynopsis> <para> - <function>mysql_get_proto_info</function> returns the protocol - version used by connection - <parameter>link_identifier</parameter>. If - <parameter>link_identifier</parameter> is omitted, the last opened - connection will be used. + Retrieves the MySQL protocol. </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + &mysql.linkid.description; + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + Returns the MySQL protocol on success, or &false; on failure. + </para> + </refsect1> + + <refsect1 role="examples"> + &reftitle.examples; <para> <example> <title><function>mysql_get_proto_info</function> example</title> @@ -33,9 +49,7 @@ ?> ]]> </programlisting> - <para> - The above example would produce the following output: - </para> + &example.outputs.similar; <screen> <![CDATA[ MySQL protocol version: 10 @@ -43,11 +57,16 @@ </screen> </example> </para> + </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; <para> - See also - <function>mysql_get_client_info</function>, - <function>mysql_get_host_info</function> and - <function>mysql_get_server_info</function>. + <simplelist> + <member><function>mysql_get_client_info</function></member> + <member><function>mysql_get_host_info</function></member> + <member><function>mysql_get_server_info</function></member> + </simplelist> </para> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc/en/reference/mysql/functions/mysql-get-server-info.xml?r1=1.12&r2=1.13&ty=u Index: phpdoc/en/reference/mysql/functions/mysql-get-server-info.xml diff -u phpdoc/en/reference/mysql/functions/mysql-get-server-info.xml:1.12 phpdoc/en/reference/mysql/functions/mysql-get-server-info.xml:1.13 --- phpdoc/en/reference/mysql/functions/mysql-get-server-info.xml:1.12 Wed Mar 30 01:27:13 2005 +++ phpdoc/en/reference/mysql/functions/mysql-get-server-info.xml Thu Mar 31 02:47:25 2005 @@ -1,24 +1,40 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.12 $ --> -<!-- splitted from ./en/functions/mysql.xml, last change in rev 1.96 --> +<!-- $Revision: 1.13 $ --> <refentry id="function.mysql-get-server-info"> <refnamediv> <refname>mysql_get_server_info</refname> <refpurpose>Get MySQL server info</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>string</type><methodname>mysql_get_server_info</methodname> <methodparam choice="opt"><type>resource</type><parameter>link_identifier</parameter></methodparam> </methodsynopsis> <para> - <function>mysql_get_server_info</function> returns the server - version used by connection - <parameter>link_identifier</parameter>. If - <parameter>link_identifier</parameter> is omitted, the last opened - connection will be used. + Retrieves the MySQL server version. </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + &mysql.linkid.description; + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + Returns the MySQL server version on success, or &false; on failure. + </para> + </refsect1> + + <refsect1 role="examples"> + &reftitle.examples; <para> <example> <title><function>mysql_get_server_info</function> example</title> @@ -33,9 +49,7 @@ ?> ]]> </programlisting> - <para> - The above example would produce the following output: - </para> + &example.outputs.similar; <screen> <![CDATA[ MySQL server version: 4.0.1-alpha @@ -43,12 +57,17 @@ </screen> </example> </para> + </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; <para> - See also - <function>mysql_get_client_info</function>, - <function>mysql_get_host_info</function>, - <function>mysql_get_proto_info</function>, and - <function>phpversion</function>. + <simplelist> + <member><function>mysql_get_client_info</function></member> + <member><function>mysql_get_host_info</function></member> + <member><function>mysql_get_proto_info</function></member> + <member><function>phpversion</function></member> + </simplelist> </para> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc/en/reference/mysql/functions/mysql-info.xml?r1=1.8&r2=1.9&ty=u Index: phpdoc/en/reference/mysql/functions/mysql-info.xml diff -u phpdoc/en/reference/mysql/functions/mysql-info.xml:1.8 phpdoc/en/reference/mysql/functions/mysql-info.xml:1.9 --- phpdoc/en/reference/mysql/functions/mysql-info.xml:1.8 Wed Mar 30 01:27:13 2005 +++ phpdoc/en/reference/mysql/functions/mysql-info.xml Thu Mar 31 02:47:25 2005 @@ -1,31 +1,50 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.8 $ --> -<!-- splitted from ./en/functions/mysql.xml, last change in rev 1.2 --> +<!-- $Revision: 1.9 $ --> <refentry id="function.mysql-info"> <refnamediv> <refname>mysql_info</refname> - <refpurpose> - Get information about the most recent query - </refpurpose> + <refpurpose>Get information about the most recent query</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>string</type><methodname>mysql_info</methodname> <methodparam choice="opt"><type>resource</type><parameter>link_identifier</parameter></methodparam> </methodsynopsis> <para> - <function>mysql_info</function> returns detailed information about - the last query using the given <parameter>link_identifier</parameter>. - If <parameter>link_identifier</parameter> isn't specified, the last - opened link is assumed. + Returns detailed information about the last query. + </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + &mysql.linkid.description; + </variablelist> </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + Returns information about the statement on success, or &false; on + failure. See the example below for which statements provide information, + and what the returned value may look like. Statements that aren't listed + will return &false; + </para> + </refsect1> + + <refsect1 role="examples"> + &reftitle.examples; <para> - <function>mysql_info</function> returns a string for all statements - listed below. For everything else, it returns &false;. The string - format depends on the given statement. <example> <title>Relevant MySQL Statements</title> + <para> + Statements that return string values. The numbers are only for + illustrating purpose; their values will correspond to the query. + </para> <programlisting role="mysql"> <![CDATA[ INSERT INTO ... SELECT ... @@ -40,22 +59,29 @@ String format: Rows matched: 65 Changed: 65 Warnings: 0 ]]> </programlisting> - </example> - The numbers are only for illustrating purpose; their values will - correspond to the query. + </example> </para> + </refsect1> + + <refsect1 role="notes"> + &reftitle.notes; <note> <para> <function>mysql_info</function> returns a non-&false; value for the INSERT ... VALUES statement only if multiple value lists are specified in the statement. - </para> + </para> </note> + </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; <para> - See also - <function>mysql_affected_rows</function>, - <function>mysql_insert_id</function>, and - <function>mysql_stat</function>. + <simplelist> + <member><function>mysql_affected_rows</function></member> + <member><function>mysql_insert_id</function></member> + <member><function>mysql_stat</function></member> + </simplelist> </para> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc/en/reference/mysql/functions/mysql-insert-id.xml?r1=1.13&r2=1.14&ty=u Index: phpdoc/en/reference/mysql/functions/mysql-insert-id.xml diff -u phpdoc/en/reference/mysql/functions/mysql-insert-id.xml:1.13 phpdoc/en/reference/mysql/functions/mysql-insert-id.xml:1.14 --- phpdoc/en/reference/mysql/functions/mysql-insert-id.xml:1.13 Wed Mar 30 01:27:13 2005 +++ phpdoc/en/reference/mysql/functions/mysql-insert-id.xml Thu Mar 31 02:47:25 2005 @@ -1,53 +1,44 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.13 $ --> -<!-- splitted from ./en/functions/mysql.xml, last change in rev 1.2 --> +<!-- $Revision: 1.14 $ --> <refentry id="function.mysql-insert-id"> <refnamediv> <refname>mysql_insert_id</refname> - <refpurpose> - Get the ID generated from the previous INSERT operation - </refpurpose> + <refpurpose>Get the ID generated from the previous INSERT operation</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>int</type><methodname>mysql_insert_id</methodname> <methodparam choice="opt"><type>resource</type><parameter>link_identifier</parameter></methodparam> </methodsynopsis> <para> - <function>mysql_insert_id</function> returns the ID generated for - an AUTO_INCREMENT column by the previous INSERT query using the - given <parameter>link_identifier</parameter>. If - <parameter>link_identifier</parameter> isn't specified, the last - opened link is assumed. + Retrieves the ID generated for an AUTO_INCREMENT column by the previous + INSERT query. </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; <para> - <function>mysql_insert_id</function> returns 0 if the previous - query does not generate an AUTO_INCREMENT value. If you need to - save the value for later, be sure to call - <function>mysql_insert_id</function> immediately after the - query that generates the value. + <variablelist> + &mysql.linkid.description; + </variablelist> </para> - <note> - <para> - The value of the MySQL SQL function - <literal>LAST_INSERT_ID()</literal> always contains the most - recently generated AUTO_INCREMENT value, and is not reset - between queries. + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + The ID generated for an AUTO_INCREMENT column by the previous + INSERT query on success, <literal>0</literal> if the previous + query does not generate an AUTO_INCREMENT value, or &false; if + no MySQL connection was established. </para> - </note> - <warning> - <para> - <function>mysql_insert_id</function> converts the return type of - the native MySQL C API function - <literal>mysql_insert_id()</literal> to a type of - <literal>long</literal> (named <type>int</type> in PHP). - If your AUTO_INCREMENT column has a column type of BIGINT, - the value returned by <function>mysql_insert_id</function> - will be incorrect. Instead, use the internal MySQL SQL function - <literal>LAST_INSERT_ID()</literal> in an SQL query. - </para> - </warning> + </refsect1> + + <refsect1 role="examples"> + &reftitle.examples; <para> <example> <title><function>mysql_insert_id</function> example</title> @@ -67,10 +58,46 @@ </programlisting> </example> </para> + </refsect1> + + <refsect1 role="notes"> + &reftitle.notes; + <caution> + <para> + <function>mysql_insert_id</function> converts the return type of + the native MySQL C API function + <literal>mysql_insert_id()</literal> to a type of + <literal>long</literal> (named <type>int</type> in PHP). + If your AUTO_INCREMENT column has a column type of BIGINT, + the value returned by <function>mysql_insert_id</function> + will be incorrect. Instead, use the internal MySQL SQL function + <literal>LAST_INSERT_ID()</literal> in an SQL query. + </para> + </caution> + <note> + <para> + Because <function>mysql_insert_id</function> acts on the last performed + query, be sure to call <function>mysql_insert_id</function> immediately + after the query that generates the value. + </para> + </note> + <note> + <para> + The value of the MySQL SQL function + <literal>LAST_INSERT_ID()</literal> always contains the most + recently generated AUTO_INCREMENT value, and is not reset + between queries. + </para> + </note> + </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; <para> - See also - <function>mysql_query</function> and - <function>mysql_info</function>. + <simplelist> + <member><function>mysql_query</function></member> + <member><function>mysql_info</function></member> + </simplelist> </para> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc/en/reference/mysql/functions/mysql-list-dbs.xml?r1=1.8&r2=1.9&ty=u Index: phpdoc/en/reference/mysql/functions/mysql-list-dbs.xml diff -u phpdoc/en/reference/mysql/functions/mysql-list-dbs.xml:1.8 phpdoc/en/reference/mysql/functions/mysql-list-dbs.xml:1.9 --- phpdoc/en/reference/mysql/functions/mysql-list-dbs.xml:1.8 Wed Mar 30 01:27:13 2005 +++ phpdoc/en/reference/mysql/functions/mysql-list-dbs.xml Thu Mar 31 02:47:25 2005 @@ -1,26 +1,44 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.8 $ --> -<!-- splitted from ./en/functions/mysql.xml, last change in rev 1.16 --> +<!-- $Revision: 1.9 $ --> <refentry id="function.mysql-list-dbs"> <refnamediv> <refname>mysql_list_dbs</refname> - <refpurpose> - List databases available on a MySQL server - </refpurpose> + <refpurpose>List databases available on a MySQL server</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>resource</type><methodname>mysql_list_dbs</methodname> <methodparam choice="opt"><type>resource</type><parameter>link_identifier</parameter></methodparam> </methodsynopsis> <para> - <function>mysql_list_dbs</function> will return a result pointer - containing the databases available from the current mysql - daemon. Use the <function>mysql_tablename</function> function to - traverse this result pointer, or any function for result tables, - such as <function>mysql_fetch_array</function>. + Returns a result pointer containing the databases available from the + current mysql daemon. + </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + &mysql.linkid.description; + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + Returns a result pointer <type>resource</type> on success, or &false; on + failure. Use the <function>mysql_tablename</function> function to traverse + this result pointer, or any function for result tables, such as + <function>mysql_fetch_array</function>. </para> + </refsect1> + + <refsect1 role="examples"> + &reftitle.examples; <para> <example> <title><function>mysql_list_dbs</function> example</title> @@ -36,33 +54,35 @@ ?> ]]> </programlisting> - <para> - The above example would produce the following output: - </para> + &example.outputs.similar; <screen> <![CDATA[ database1 database2 database3 -... ]]> </screen> </example> </para> + </refsect1> + + <refsect1 role="notes"> + &reftitle.notes; <note> <para> - The above code would just as easily work with - <function>mysql_fetch_row</function> or other similar functions. + &info.deprecated.alias; + <function>mysql_listdbs</function> </para> </note> + </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; <para> - For downward compatibility <function>mysql_listdbs</function> can - also be used. This is deprecated however. - </para> - <para> - See also - <function>mysql_db_name</function>, and - <function>mysql_select_db</function>. + <simplelist> + <member><function>mysql_db_name</function></member> + <member><function>mysql_select_db</function></member> + </simplelist> </para> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc/en/reference/mysql/functions/mysql-list-fields.xml?r1=1.10&r2=1.11&ty=u Index: phpdoc/en/reference/mysql/functions/mysql-list-fields.xml diff -u phpdoc/en/reference/mysql/functions/mysql-list-fields.xml:1.10 phpdoc/en/reference/mysql/functions/mysql-list-fields.xml:1.11 --- phpdoc/en/reference/mysql/functions/mysql-list-fields.xml:1.10 Wed Mar 30 01:27:13 2005 +++ phpdoc/en/reference/mysql/functions/mysql-list-fields.xml Thu Mar 31 02:47:25 2005 @@ -1,35 +1,70 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.10 $ --> -<!-- splitted from ./en/functions/mysql.xml, last change in rev 1.2 --> +<!-- $Revision: 1.11 $ --> <refentry id="function.mysql-list-fields"> <refnamediv> <refname>mysql_list_fields</refname> <refpurpose>List MySQL table fields</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>resource</type><methodname>mysql_list_fields</methodname> <methodparam><type>string</type><parameter>database_name</parameter></methodparam> <methodparam><type>string</type><parameter>table_name</parameter></methodparam> <methodparam choice="opt"><type>resource</type><parameter>link_identifier</parameter></methodparam> </methodsynopsis> - <note> - <para> - The function <function>mysql_list_fields</function> is deprecated. It - is preferable to use <function>mysql_query</function> to issue a - SQL <literal>SHOW COLUMNS FROM table [LIKE 'name']</literal> Statement instead. - </para> - </note> <para> - <function>mysql_list_fields</function> retrieves information - about the given table name. Arguments are the database and - the table name. A result pointer is returned which can be used - with <function>mysql_field_flags</function>, + Retrieves information about the given table name. + </para> + <para> + This function is deprecated. It is preferable to use + <function>mysql_query</function> to issue a SQL <literal>SHOW COLUMNS FROM + table [LIKE 'name']</literal> statement instead. + </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>database_name</parameter></term> + <listitem> + <para> + The name of the database that's being queried. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>table_name</parameter></term> + <listitem> + <para> + The name of the table that's being queried. + </para> + </listitem> + </varlistentry> + &mysql.linkid.description; + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + A result pointer <type>resource</type> on success, or &false; on + failure. + </para> + <para> + The returned result can be used with <function>mysql_field_flags</function>, <function>mysql_field_len</function>, - <function>mysql_field_name</function>, and + <function>mysql_field_name</function>&listendand; <function>mysql_field_type</function>. </para> + </refsect1> + + <refsect1 role="examples"> + &reftitle.examples; <para> <example> <title>Alternate to deprecated <function>mysql_list_fields</function></title> @@ -49,9 +84,7 @@ ?> ]]> </programlisting> - <para> - The above example would produce output similar to: - </para> + &example.outputs.similar; <screen> <![CDATA[ Array @@ -76,14 +109,25 @@ </screen> </example> </para> + </refsect1> + + <refsect1 role="notes"> + &reftitle.notes; + <note> + <para> + &info.deprecated.alias; + <function>mysql_listfields</function> + </para> + </note> + </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; <para> - For downward compatibility <function>mysql_listfields</function> - can also be used. This is deprecated however. - </para> - <para> - See also - <function>mysql_field_flags</function> and - <function>mysql_info</function>. + <simplelist> + <member><function>mysql_field_flags</function></member> + <member><function>mysql_info</function></member> + </simplelist> </para> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc/en/reference/mysql/functions/mysql-list-processes.xml?r1=1.8&r2=1.9&ty=u Index: phpdoc/en/reference/mysql/functions/mysql-list-processes.xml diff -u phpdoc/en/reference/mysql/functions/mysql-list-processes.xml:1.8 phpdoc/en/reference/mysql/functions/mysql-list-processes.xml:1.9 --- phpdoc/en/reference/mysql/functions/mysql-list-processes.xml:1.8 Wed Mar 30 01:27:13 2005 +++ phpdoc/en/reference/mysql/functions/mysql-list-processes.xml Thu Mar 31 02:47:25 2005 @@ -1,21 +1,40 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.8 $ --> -<!-- splitted from ./en/functions/mysql.xml, last change in rev 1.96 --> +<!-- $Revision: 1.9 $ --> <refentry id="function.mysql-list-processes"> <refnamediv> <refname>mysql_list_processes</refname> <refpurpose>List MySQL processes</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>resource</type><methodname>mysql_list_processes</methodname> <methodparam choice="opt"><type>resource</type><parameter>link_identifier</parameter></methodparam> </methodsynopsis> <para> - <function>mysql_list_processes</function> returns a result pointer - describing the current server threads. + Retrieves the current MySQL server threads. </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + &mysql.linkid.description; + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + A result pointer <type>resource</type> on success, or &false; on failure. + </para> + </refsect1> + + <refsect1 role="examples"> + &reftitle.examples; <para> <example> <title><function>mysql_list_processes</function> example</title> @@ -33,9 +52,7 @@ ?> ]]> </programlisting> - <para> - The above example would produce the following output: - </para> + &example.outputs.similar; <screen> <![CDATA[ 1 localhost test Processlist 0 @@ -44,10 +61,15 @@ </screen> </example> </para> + </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; <para> - See also - <function>mysql_thread_id</function> and - <function>mysql_stat</function>. + <simplelist> + <member><function>mysql_thread_id</function></member> + <member><function>mysql_stat</function></member> + </simplelist> </para> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc/en/reference/mysql/functions/mysql-list-tables.xml?r1=1.15&r2=1.16&ty=u Index: phpdoc/en/reference/mysql/functions/mysql-list-tables.xml diff -u phpdoc/en/reference/mysql/functions/mysql-list-tables.xml:1.15 phpdoc/en/reference/mysql/functions/mysql-list-tables.xml:1.16 --- phpdoc/en/reference/mysql/functions/mysql-list-tables.xml:1.15 Wed Mar 30 01:27:13 2005 +++ phpdoc/en/reference/mysql/functions/mysql-list-tables.xml Thu Mar 31 02:47:25 2005 @@ -1,43 +1,59 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.15 $ --> -<!-- splitted from ./en/functions/mysql.xml, last change in rev 1.2 --> +<!-- $Revision: 1.16 $ --> <refentry id="function.mysql-list-tables"> <refnamediv> <refname>mysql_list_tables</refname> <refpurpose>List tables in a MySQL database</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>resource</type><methodname>mysql_list_tables</methodname> <methodparam><type>string</type><parameter>database</parameter></methodparam> <methodparam choice="opt"><type>resource</type><parameter>link_identifier</parameter></methodparam> </methodsynopsis> <para> - <function>mysql_list_tables</function> takes a database name and - returns a result pointer much like the - <function>mysql_query</function> function. - Use the <function>mysql_tablename</function> function to - traverse this result pointer, or any function for result tables, - such as <function>mysql_fetch_array</function>. + Retrieves a list of table names from a MySQL database. </para> <para> - The <parameter>database</parameter> parameter is the name of the - database to retrieve the list of tables from. Upon failure, - <function>mysql_list_tables</function> returns &false;. + This function deprecated. It is preferable to use + <function>mysql_query</function> to issue a SQL <literal>SHOW TABLES + [FROM db_name] [LIKE 'pattern']</literal> statement instead. </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; <para> - For downward compatibility, the function alias named - <function>mysql_listtables</function> can be used. This is - deprecated however and is not recommended. + <variablelist> + <varlistentry> + <term><parameter>database</parameter></term> + <listitem> + <para> + The name of the database + </para> + </listitem> + </varlistentry> + &mysql.linkid.description; + </variablelist> </para> - <note> - <para> - The function <function>mysql_list_tables</function> is deprecated. It - is preferable to use <function>mysql_query</function> to issue a - SQL <literal>SHOW TABLES [FROM db_name] [LIKE 'pattern']</literal> statement instead. - </para> - </note> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + A result pointer <type>resource</type> on success, or &false; on failure. + </para> + <para> + Use the <function>mysql_tablename</function> function to + traverse this result pointer, or any function for result tables, + such as <function>mysql_fetch_array</function>. + </para> + </refsect1> + + <refsect1 role="examples"> + &reftitle.examples; <para> <example> <title><function>mysql_list_tables</function> alternative example</title> @@ -70,10 +86,25 @@ </programlisting> </example> </para> + </refsect1> + + <refsect1 role="notes"> + &reftitle.notes; + <note> + <para> + &info.deprecated.alias; + <function>mysql_listtables</function> + </para> + </note> + </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; <para> - See also - <function>mysql_list_dbs</function> and - <function>mysql_tablename</function>. + <simplelist> + <member><function>mysql_list_dbs</function></member> + <member><function>mysql_tablename</function></member> + </simplelist> </para> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc/en/reference/mysql/functions/mysql-num-fields.xml?r1=1.8&r2=1.9&ty=u Index: phpdoc/en/reference/mysql/functions/mysql-num-fields.xml diff -u phpdoc/en/reference/mysql/functions/mysql-num-fields.xml:1.8 phpdoc/en/reference/mysql/functions/mysql-num-fields.xml:1.9 --- phpdoc/en/reference/mysql/functions/mysql-num-fields.xml:1.8 Wed Mar 30 01:27:14 2005 +++ phpdoc/en/reference/mysql/functions/mysql-num-fields.xml Thu Mar 31 02:47:25 2005 @@ -1,21 +1,41 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.8 $ --> -<!-- splitted from ./en/functions/mysql.xml, last change in rev 1.2 --> +<!-- $Revision: 1.9 $ --> <refentry id="function.mysql-num-fields"> <refnamediv> <refname>mysql_num_fields</refname> <refpurpose>Get number of fields in result</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>int</type><methodname>mysql_num_fields</methodname> <methodparam><type>resource</type><parameter>result</parameter></methodparam> </methodsynopsis> <para> - <function>mysql_num_fields</function> returns the number of - fields in the result set <parameter>result</parameter>. + Retrieves the number of fields from a query. + </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + &mysql.result.description; + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + Returns the number of fields in the result set <type>resource</type> on + success, or &false; on failure. </para> + </refsect1> + + <refsect1 role="examples"> + &reftitle.examples; <para> <example> <title>A <function>mysql_num_fields</function> example</title> @@ -35,16 +55,27 @@ </programlisting> </example> </para> + </refsect1> + + <refsect1 role="notes"> + &reftitle.notes; + <note> + <para> + &info.deprecated.alias; + <function>mysql_numfields</function> + </para> + </note> + </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; <para> - For downward compatibility <function>mysql_numfields</function> - can also be used. This is deprecated however. - </para> - <para> - See also - <function>mysql_select_db</function>, - <function>mysql_query</function>, - <function>mysql_fetch_field</function> and - <function>mysql_num_rows</function>. + <simplelist> + <member><function>mysql_select_db</function></member> + <member><function>mysql_query</function></member> + <member><function>mysql_fetch_field</function></member> + <member><function>mysql_num_rows</function></member> + </simplelist> </para> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc/en/reference/mysql/functions/mysql-num-rows.xml?r1=1.7&r2=1.8&ty=u Index: phpdoc/en/reference/mysql/functions/mysql-num-rows.xml diff -u phpdoc/en/reference/mysql/functions/mysql-num-rows.xml:1.7 phpdoc/en/reference/mysql/functions/mysql-num-rows.xml:1.8 --- phpdoc/en/reference/mysql/functions/mysql-num-rows.xml:1.7 Wed Mar 30 01:27:14 2005 +++ phpdoc/en/reference/mysql/functions/mysql-num-rows.xml Thu Mar 31 02:47:25 2005 @@ -1,22 +1,43 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.7 $ --> -<!-- splitted from ./en/functions/mysql.xml, last change in rev 1.2 --> +<!-- $Revision: 1.8 $ --> <refentry id="function.mysql-num-rows"> <refnamediv> <refname>mysql_num_rows</refname> <refpurpose>Get number of rows in result</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>int</type><methodname>mysql_num_rows</methodname> <methodparam><type>resource</type><parameter>result</parameter></methodparam> </methodsynopsis> <para> - <function>mysql_num_rows</function> returns the number of rows in - a result set. This command is only valid for SELECT statements. - To retrieve the number of rows affected by a INSERT, UPDATE or - DELETE query, use <function>mysql_affected_rows</function>. + Retrieves the number of rows from a result set. This command is only valid + for SELECT statements. To retrieve the number of rows affected by a INSERT, + UPDATE, or DELETE query, use <function>mysql_affected_rows</function>. + </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + &mysql.result.description; + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + The number of rows in a result set on success, or &false; on failure. + </para> + </refsect1> + + <refsect1 role="examples"> + &reftitle.examples; + <para> <example> <title><function>mysql_num_rows</function> example</title> <programlisting role="php"> @@ -36,6 +57,10 @@ </programlisting> </example> </para> + </refsect1> + + <refsect1 role="notes"> + &reftitle.notes; <note> <para> If you use <function>mysql_unbuffered_query</function>, @@ -44,17 +69,24 @@ retrieved. </para> </note> + <note> + <para> + &info.deprecated.alias; + <function>mysql_numrows</function> + </para> + </note> + </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; <para> - See also - <function>mysql_affected_rows</function>, - <function>mysql_connect</function>, - <function>mysql_data_seek</function>, - <function>mysql_select_db</function> and - <function>mysql_query</function>. - </para> - <para> - For downward compatibility <function>mysql_numrows</function> can - also be used. This is deprecated however. + <simplelist> + <member><function>mysql_affected_rows</function></member> + <member><function>mysql_connect</function></member> + <member><function>mysql_data_seek</function></member> + <member><function>mysql_select_db</function></member> + <member><function>mysql_query</function></member> + </simplelist> </para> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc/en/reference/mysql/functions/mysql-pconnect.xml?r1=1.8&r2=1.9&ty=u Index: phpdoc/en/reference/mysql/functions/mysql-pconnect.xml diff -u phpdoc/en/reference/mysql/functions/mysql-pconnect.xml:1.8 phpdoc/en/reference/mysql/functions/mysql-pconnect.xml:1.9 --- phpdoc/en/reference/mysql/functions/mysql-pconnect.xml:1.8 Wed Mar 30 01:27:14 2005 +++ phpdoc/en/reference/mysql/functions/mysql-pconnect.xml Thu Mar 31 02:47:25 2005 @@ -1,15 +1,13 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.8 $ --> -<!-- splitted from ./en/functions/mysql.xml, last change in rev 1.2 --> +<!-- $Revision: 1.9 $ --> <refentry id="function.mysql-pconnect"> <refnamediv> <refname>mysql_pconnect</refname> - <refpurpose> - Open a persistent connection to a MySQL server - </refpurpose> + <refpurpose>Open a persistent connection to a MySQL server</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>resource</type><methodname>mysql_pconnect</methodname> <methodparam choice="opt"><type>string</type><parameter>server</parameter></methodparam> @@ -18,37 +16,9 @@ <methodparam choice="opt"><type>int</type><parameter>client_flags</parameter></methodparam> </methodsynopsis> <para> - Returns a positive MySQL persistent link identifier on success, - or &false; on error. - </para> - <para> - <function>mysql_pconnect</function> establishes a connection - to a MySQL server. The following defaults are assumed for - missing optional parameters: <parameter>server</parameter> = - 'localhost:3306', <parameter>username</parameter> = name of the - user that owns the server process and - <parameter>password</parameter> = empty password. - The <parameter>client_flags</parameter> - parameter can be a combination of the constants - MYSQL_CLIENT_COMPRESS, MYSQL_CLIENT_IGNORE_SPACE or - MYSQL_CLIENT_INTERACTIVE. - </para> - <para> - The <parameter>server</parameter> parameter can also include a port - number. e.g. &quot;hostname:port&quot; or a path to a socket - e.g. &quot;:/path/to/socket&quot; for the localhost. - <note> - <para> - Support for &quot;:port&quot; was added in 3.0B4. - </para> - <para> - Support for the &quot;:/path/to/socket&quot; was added in - 3.0.10. - </para> - </note> + Establishes a persistent connection to a MySQL server. </para> - - <!-- TODO move the story to features.persistent, and refer to that --> + <!-- TODO: Integrate this information more nicely with features.persistent --> <para> <function>mysql_pconnect</function> acts very much like <function>mysql_connect</function> with two major differences. @@ -66,12 +36,109 @@ close links established by <function>mysql_pconnect</function>). </para> <para> - The optional <parameter>client_flags</parameter> parameter became - available in PHP 4.3.0. + This type of link is therefore called 'persistent'. + </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>server</parameter></term> + <listitem> + <para> + The MySQL server. It can also include a port number. e.g. + "hostname:port" or a path to a local socket e.g. ":/path/to/socket" for + the localhost. + </para> + <para> + If the PHP directive <link linkend="ini.mysql.default-host"> + mysql.default_host</link> is undefined (default), then the default + value is 'localhost:3306' + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>username</parameter></term> + <listitem> + <para> + The username. Default value is the name of the user that owns the + server process. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>password</parameter></term> + <listitem> + <para> + The password. Default value is an empty password. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>client_flags</parameter></term> + <listitem> + <para> + The <parameter>client_flags</parameter> parameter can be a combination + of the following constants: + <constant>MYSQL_CLIENT_COMPRESS</constant>, + <constant>MYSQL_CLIENT_IGNORE_SPACE</constant> or + <constant>MYSQL_CLIENT_INTERACTIVE</constant>. + </para> + </listitem> + </varlistentry> + </variablelist> </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; <para> - This type of link is therefore called 'persistent'. + Returns a MySQL persistent link identifier on success, or &false; on + failure. </para> + </refsect1> + + <refsect1 role="changelog"> + &reftitle.changelog; + <para> + <informaltable> + <tgroup cols="2"> + <thead> + <row> + <entry>&Version;</entry> + <entry>&Description;</entry> + </row> + </thead> + <tbody> + <row> + <entry>4.3.0</entry> + <entry> + Added the <parameter>client_flags</parameter> parameter. + </entry> + </row> + <row> + <entry>3.0.10</entry> + <entry> + Added support for ":/path/to/socket" with + <parameter>server</parameter>. + </entry> + </row> + <row> + <entry>3.0.0</entry> + <entry> + Added support for ":port" with <parameter>server</parameter>. + </entry> + </row> + </tbody> + </tgroup> + </informaltable> + </para> + </refsect1> + + <refsect1 role="notes"> + &reftitle.notes; <note> <para> Note, that these kind of links only work if you are using @@ -87,6 +154,24 @@ connections allowed by MySQL. </para> </warning> + <note> + <para> + You can suppress the error message on failure by prepending + a <link linkend="language.operators.errorcontrol">@</link> + to the function name. + </para> + </note> + </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; + <para> + <simplelist> + <member><function>mysql_connect</function></member> + <member><link linkend="features.persistent-connections">Persistent + Database Connections</link></member> + </simplelist> + </para> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc/en/reference/mysql/functions/mysql-ping.xml?r1=1.7&r2=1.8&ty=u Index: phpdoc/en/reference/mysql/functions/mysql-ping.xml diff -u phpdoc/en/reference/mysql/functions/mysql-ping.xml:1.7 phpdoc/en/reference/mysql/functions/mysql-ping.xml:1.8 --- phpdoc/en/reference/mysql/functions/mysql-ping.xml:1.7 Wed Mar 30 01:27:14 2005 +++ phpdoc/en/reference/mysql/functions/mysql-ping.xml Thu Mar 31 02:47:25 2005 @@ -1,26 +1,45 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.7 $ --> -<!-- splitted from ./en/functions/mysql.xml, last change in rev 1.100 --> +<!-- $Revision: 1.8 $ --> <refentry id="function.mysql-ping"> <refnamediv> <refname>mysql_ping</refname> <refpurpose>Ping a server connection or reconnect if there is no connection</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>bool</type><methodname>mysql_ping</methodname> <methodparam choice="opt"><type>resource</type><parameter>link_identifier</parameter></methodparam> </methodsynopsis> <para> - <function>mysql_ping</function> checks whether or not the connection to + Checks whether or not the connection to the server is working. If it has gone down, an automatic reconnection is attempted. This function can be used by scripts that remain idle for a long while, to check whether or not the server has closed the connection and reconnect if necessary. - <function>mysql_ping</function> returns &true; if the connection to the - server is working, otherwise &false;. </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + &mysql.linkid.description; + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + Returns &true; if the connection to the server MySQL server is working, + otherwise &false;. + </para> + </refsect1> + + <refsect1 role="examples"> + &reftitle.examples; <para> <example> <title>A <function>mysql_ping</function> example</title> @@ -53,10 +72,15 @@ </programlisting> </example> </para> + </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; <para> - See also - <function>mysql_thread_id</function> and - <function>mysql_list_processes</function>. + <simplelist> + <member><function>mysql_thread_id</function></member> + <member><function>mysql_list_processes</function></member> + </simplelist> </para> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc/en/reference/mysql/functions/mysql-query.xml?r1=1.14&r2=1.15&ty=u Index: phpdoc/en/reference/mysql/functions/mysql-query.xml diff -u phpdoc/en/reference/mysql/functions/mysql-query.xml:1.14 phpdoc/en/reference/mysql/functions/mysql-query.xml:1.15 --- phpdoc/en/reference/mysql/functions/mysql-query.xml:1.14 Sat Jan 29 03:23:50 2005 +++ phpdoc/en/reference/mysql/functions/mysql-query.xml Thu Mar 31 02:47:25 2005 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.14 $ --> +<!-- $Revision: 1.15 $ --> <!-- splitted from ./en/functions/mysql.xml, last change in rev 1.62 --> <refentry id="function.mysql-query"> <refnamediv> @@ -36,20 +36,7 @@ </para> </listitem> </varlistentry> - <varlistentry> - <term><parameter>link_identifier</parameter></term> - <listitem> - <para> - A link identifier, as returned by <function>mysql_connect</function>. - </para> - <para> - If <parameter>link_identifier</parameter> isn't specified, the last - opened link is assumed. If no link is open, the function tries - to establish a link as if <function>mysql_connect</function> was - called with no arguments, and use it. The result of the query is buffered. - </para> - </listitem> - </varlistentry> + &mysql.linkid.description; </variablelist> </para> </refsect1> @@ -59,13 +46,13 @@ <para> For SELECT, SHOW, DESCRIBE or EXPLAIN statements, <function>mysql_query</function> - returns a <type>resource</type> on success, and &false; on + returns a <type>resource</type> on success, or &false; on error. </para> <para> For other type of SQL statements, UPDATE, DELETE, DROP, etc, <function>mysql_query</function> returns &true; on success - and &false; on error. + or &false; on error. </para> <para> The returned result resource should be passed to http://cvs.php.net/diff.php/phpdoc/en/reference/mysql/functions/mysql-real-escape-string.xml?r1=1.22&r2=1.23&ty=u Index: phpdoc/en/reference/mysql/functions/mysql-real-escape-string.xml diff -u phpdoc/en/reference/mysql/functions/mysql-real-escape-string.xml:1.22 phpdoc/en/reference/mysql/functions/mysql-real-escape-string.xml:1.23 --- phpdoc/en/reference/mysql/functions/mysql-real-escape-string.xml:1.22 Tue Mar 29 23:07:29 2005 +++ phpdoc/en/reference/mysql/functions/mysql-real-escape-string.xml Thu Mar 31 02:47:25 2005 @@ -1,56 +1,63 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.22 $ --> -<!-- splitted from ./en/functions/mysql.xml, last change in rev 1.100 --> +<!-- $Revision: 1.23 $ --> <refentry id="function.mysql-real-escape-string"> <refnamediv> <refname>mysql_real_escape_string</refname> - <refpurpose> - Escapes special characters in a string for use in a SQL statement - </refpurpose> + <refpurpose>Escapes special characters in a string for use in a SQL statement</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>string</type><methodname>mysql_real_escape_string</methodname> <methodparam><type>string</type><parameter>unescaped_string</parameter></methodparam> <methodparam choice="opt"><type>resource</type><parameter>link_identifier</parameter></methodparam> </methodsynopsis> <para> + Escapes special characters in the <parameter>unescaped_string</parameter>, + taking into account the current character set of the connection so that it + is safe to place it in a <function>mysql_query</function>. If binary data + is to be inserted, this function must be used. + </para> + <para> + <function>mysql_real_escape_string</function> calls MySQL's library function + mysql_escape_string, which prepends backslashes to the following characters: + <literal>NULL</literal>, <literal>\x00</literal>, <literal>\n</literal>, + <literal>\r</literal>, <literal>\</literal>, <literal>'</literal>, + <literal>"</literal> and <literal>\x1a</literal>. + </para> + <para> + This function must always (with few exceptions) be used to make data + safe before sending a query to MySQL. + </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> <variablelist> <varlistentry> <term><parameter>unescaped_string</parameter></term> - <listitem><simpara>The string to escape</simpara> + <listitem> + <para> + The string that is to be escaped. + </para> </listitem> </varlistentry> - <varlistentry> - <term><parameter>link_identifier</parameter> (optional)</term> - <listitem><simpara>The mysql connection resource</simpara></listitem> - </varlistentry> + &mysql.linkid.description; </variablelist> </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; <para> - This function will escape special characters in the - <parameter>unescaped_string</parameter>, taking into account the current - character set of the connection so that it is safe to place it in a - <function>mysql_query</function>. If binary data is to be inserted, this function - must be used. - </para> - <note> - <para> - A MySQL connection is required before using - <function>mysql_real_escape_string</function> otherwise an error of - level <literal>E_WARNING</literal> is generated, and &false; is - returned. If <parameter>link_identifier</parameter> isn't defined, the - last MySQL connection is used. - </para> - </note> - <para> - <function>mysql_real_escape_string</function> calls MySQL's library function - mysql_escape_string, which prepends backslashes to the following characters: - <literal>NULL</literal>, <literal>\x00</literal>, <literal>\n</literal>, - <literal>\r</literal>, <literal>\</literal>, <literal>'</literal>, - <literal>"</literal> and <literal>\x1a</literal>. + Returns the escaped string, or &false; on error. </para> + </refsect1> + + <refsect1 role="examples"> + &reftitle.examples; <para> <example> <title>Simple <function>mysql_real_escape_string</function> example</title> @@ -71,21 +78,6 @@ </example> </para> <para> - This function must always (with few exceptions) be used to make data - safe before sending a query to MySQL. - </para> - <note> - <para> - If <link linkend="ini.magic-quotes-gpc">magic_quotes_gpc</link> is enabled, - first apply <function>stripslashes</function> to the data. Using this function - on data which has already been escaped will escape the data twice. - </para> - </note> - <para> - If this function is not used to escape data, the query is vulnerable to - <link linkend="security.database.sql-injection">SQL Injection Attacks</link>. - </para> - <para> <example> <title>An example SQL Injection Attack</title> <programlisting role="php"> @@ -161,6 +153,32 @@ </para> </example> </para> + </refsect1> + + <refsect1 role="notes"> + &reftitle.notes; + <note> + <para> + A MySQL connection is required before using + <function>mysql_real_escape_string</function> otherwise an error of + level <literal>E_WARNING</literal> is generated, and &false; is + returned. If <parameter>link_identifier</parameter> isn't defined, the + last MySQL connection is used. + </para> + </note> + <note> + <para> + If <link linkend="ini.magic-quotes-gpc">magic_quotes_gpc</link> is enabled, + first apply <function>stripslashes</function> to the data. Using this function + on data which has already been escaped will escape the data twice. + </para> + </note> + <note> + <para> + If this function is not used to escape data, the query is vulnerable to + <link linkend="security.database.sql-injection">SQL Injection Attacks</link>. + </para> + </note> <note> <simpara> <function>mysql_real_escape_string</function> does not escape @@ -169,15 +187,18 @@ or <literal>REVOKE</literal>. </simpara> </note> + </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; <para> - See also - <function>mysql_client_encoding</function>, - <function>addslashes</function>, - <function>stripslashes</function>, - the <link linkend="ini.magic-quotes-gpc">magic_quotes_gpc</link>, - and the - <link linkend="ini.magic-quotes-runtime">magic_quotes_runtime</link> - directive. + <simplelist> + <member><function>mysql_client_encoding</function></member> + <member><function>addslashes</function></member> + <member><function>stripslashes</function></member> + <member>The <link linkend="ini.magic-quotes-gpc">magic_quotes_gpc</link> directive</member> + <member>The <link linkend="ini.magic-quotes-runtime">magic_quotes_runtime</link> directive</member> + </simplelist> </para> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc/en/reference/mysql/functions/mysql-result.xml?r1=1.9&r2=1.10&ty=u Index: phpdoc/en/reference/mysql/functions/mysql-result.xml diff -u phpdoc/en/reference/mysql/functions/mysql-result.xml:1.9 phpdoc/en/reference/mysql/functions/mysql-result.xml:1.10 --- phpdoc/en/reference/mysql/functions/mysql-result.xml:1.9 Wed Mar 30 01:27:14 2005 +++ phpdoc/en/reference/mysql/functions/mysql-result.xml Thu Mar 31 02:47:25 2005 @@ -1,13 +1,13 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.9 $ --> -<!-- splitted from ./en/functions/mysql.xml, last change in rev 1.2 --> +<!-- $Revision: 1.10 $ --> <refentry id="function.mysql-result"> <refnamediv> <refname>mysql_result</refname> <refpurpose>Get result data</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>mixed</type><methodname>mysql_result</methodname> <methodparam><type>resource</type><parameter>result</parameter></methodparam> @@ -15,12 +15,7 @@ <methodparam choice="opt"><type>mixed</type><parameter>field</parameter></methodparam> </methodsynopsis> <para> - <function>mysql_result</function> returns the contents of one - cell from a MySQL result set. The field argument can be the - field's offset, or the field's name, or the field's table dot - field name (tablename.fieldname). If the column name has been - aliased ('select foo as bar from...'), use the alias instead of - the column name. + Retrieves the contents of one cell from a MySQL result set. </para> <para> When working on large result sets, you should consider using one @@ -31,10 +26,50 @@ numeric offset for the field argument is much quicker than specifying a fieldname or tablename.fieldname argument. </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; <para> - Calls to <function>mysql_result</function> should not be mixed - with calls to other functions that deal with the result set. + <variablelist> + &mysql.result.description; + <varlistentry> + <term><parameter>row</parameter></term> + <listitem> + <para> + The row number from the result that's being retrieved. Row numbers + start at <literal>0</literal>. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>field</parameter></term> + <listitem> + <para> + The name or offset of the field being retrieved. + </para> + <para> + It can be the field's offset, the field's name, or the field's table + dot field name (tablename.fieldname). If the column name has been + aliased ('select foo as bar from...'), use the alias instead of the + column name. If undefined, the first field is retrieved. + </para> + </listitem> + </varlistentry> + </variablelist> </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + The contents of one cell from a MySQL result set on success, or + &false; on failure. + </para> + </refsect1> + + <refsect1 role="examples"> + &reftitle.examples; <para> <example> <title><function>mysql_result</function> example</title> @@ -57,12 +92,27 @@ </programlisting> </example> </para> + </refsect1> + + <refsect1 role="notes"> + &reftitle.notes; + <note> + <para> + Calls to <function>mysql_result</function> should not be mixed + with calls to other functions that deal with the result set. + </para> + </note> + </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; <para> - Recommended high-performance alternatives : - <function>mysql_fetch_row</function>, - <function>mysql_fetch_array</function>, - <function>mysql_fetch_assoc</function> and - <function>mysql_fetch_object</function>. + <simplelist> + <member><function>mysql_fetch_row</function></member> + <member><function>mysql_fetch_array</function></member> + <member><function>mysql_fetch_assoc</function></member> + <member><function>mysql_fetch_object</function></member> + </simplelist> </para> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc/en/reference/mysql/functions/mysql-select-db.xml?r1=1.9&r2=1.10&ty=u Index: phpdoc/en/reference/mysql/functions/mysql-select-db.xml diff -u phpdoc/en/reference/mysql/functions/mysql-select-db.xml:1.9 phpdoc/en/reference/mysql/functions/mysql-select-db.xml:1.10 --- phpdoc/en/reference/mysql/functions/mysql-select-db.xml:1.9 Wed Mar 30 01:27:14 2005 +++ phpdoc/en/reference/mysql/functions/mysql-select-db.xml Thu Mar 31 02:47:25 2005 @@ -1,33 +1,51 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.9 $ --> -<!-- splitted from ./en/functions/mysql.xml, last change in rev 1.2 --> +<!-- $Revision: 1.10 $ --> <refentry id="function.mysql-select-db"> <refnamediv> <refname>mysql_select_db</refname> <refpurpose>Select a MySQL database</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>bool</type><methodname>mysql_select_db</methodname> <methodparam><type>string</type><parameter>database_name</parameter></methodparam> <methodparam choice="opt"><type>resource</type><parameter>link_identifier</parameter></methodparam> </methodsynopsis> <para> - &return.success; + Sets the current active database on the server that's associated with the + specified link identifier. Every subsequent call to + <function>mysql_query</function> will be made on the active database. </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; <para> - <function>mysql_select_db</function> sets the current active - database on the server that's associated with the specified link - identifier. If no link identifier is specified, the last opened - link is assumed. If no link is open, the function will try to - establish a link as if <function>mysql_connect</function> was - called without arguments, and use it. + <variablelist> + <varlistentry> + <term><parameter>database_name</parameter></term> + <listitem> + <para> + The name of the database that is to be selected. + </para> + </listitem> + </varlistentry> + &mysql.linkid.description; + </variablelist> </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; <para> - Every subsequent call to <function>mysql_query</function> will be - made on the active database. + &return.success; </para> + </refsect1> + + <refsect1 role="examples"> + &reftitle.examples; <para> <example> <title><function>mysql_select_db</function> example</title> @@ -50,15 +68,26 @@ </programlisting> </example> </para> + </refsect1> + + <refsect1 role="notes"> + &reftitle.notes; + <note> + <para> + &info.deprecated.alias; + <function>mysql_createdb</function> + </para> + </note> + </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; <para> - See also - <function>mysql_connect</function>, - <function>mysql_pconnect</function> and - <function>mysql_query</function>. - </para> - <para> - For downward compatibility <function>mysql_selectdb</function> - can also be used. This is deprecated however. + <simplelist> + <member><function>mysql_connect</function></member> + <member><function>mysql_pconnect</function></member> + <member><function>mysql_query</function></member> + </simplelist> </para> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc/en/reference/mysql/functions/mysql-stat.xml?r1=1.10&r2=1.11&ty=u Index: phpdoc/en/reference/mysql/functions/mysql-stat.xml diff -u phpdoc/en/reference/mysql/functions/mysql-stat.xml:1.10 phpdoc/en/reference/mysql/functions/mysql-stat.xml:1.11 --- phpdoc/en/reference/mysql/functions/mysql-stat.xml:1.10 Wed Jan 26 14:20:34 2005 +++ phpdoc/en/reference/mysql/functions/mysql-stat.xml Thu Mar 31 02:47:25 2005 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.10 $ --> +<!-- $Revision: 1.11 $ --> <!-- splitted from ./en/functions/mysql.xml, last change in rev 1.62 --> <refentry id="function.mysql-stat"> <refnamediv> @@ -20,14 +20,7 @@ &reftitle.parameters; <para> <variablelist> - <varlistentry> - <term><parameter>link_identifier</parameter></term> - <listitem> - <para> - Link to the MySQL connection. - </para> - </listitem> - </varlistentry> + &mysql.linkid.description; </variablelist> </para> </refsect1> http://cvs.php.net/diff.php/phpdoc/en/reference/mysql/functions/mysql-tablename.xml?r1=1.13&r2=1.14&ty=u Index: phpdoc/en/reference/mysql/functions/mysql-tablename.xml diff -u phpdoc/en/reference/mysql/functions/mysql-tablename.xml:1.13 phpdoc/en/reference/mysql/functions/mysql-tablename.xml:1.14 --- phpdoc/en/reference/mysql/functions/mysql-tablename.xml:1.13 Wed Mar 30 01:27:14 2005 +++ phpdoc/en/reference/mysql/functions/mysql-tablename.xml Thu Mar 31 02:47:25 2005 @@ -1,27 +1,68 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.13 $ --> -<!-- splitted from ./en/functions/mysql.xml, last change in rev 1.2 --> +<!-- $Revision: 1.14 $ --> <refentry id="function.mysql-tablename"> <refnamediv> <refname>mysql_tablename</refname> <refpurpose>Get table name of field</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>string</type><methodname>mysql_tablename</methodname> <methodparam><type>resource</type><parameter>result</parameter></methodparam> <methodparam><type>int</type><parameter>i</parameter></methodparam> </methodsynopsis> <para> - <function>mysql_tablename</function> takes a result pointer - returned by the <function>mysql_list_tables</function> function - as well as an integer index and returns the name of a table. The - <function>mysql_num_rows</function> function may be used to - determine the number of tables in the result pointer. + Retrieves the table name from a <parameter>result</parameter>. + </para> + <para> + This function deprecated. It is preferable to use + <function>mysql_query</function> to issue a SQL <literal>SHOW TABLES + [FROM db_name] [LIKE 'pattern']</literal> statement instead. + </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>result</parameter></term> + <listitem> + <para> + A result pointer <type>resource</type> that's returned from + <function>mysql_list_tables</function>. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>i</parameter></term> + <listitem> + <para> + The integer index (row/table number) + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + The name of the table on success, or &false; on failure. + </para> + <para> Use the <function>mysql_tablename</function> function to traverse this result pointer, or any function for result tables, such as <function>mysql_fetch_array</function>. + </para> + </refsect1> + + <refsect1 role="examples"> + &reftitle.examples; + <para> <example> <title><function>mysql_tablename</function> example</title> <programlisting role="php"> @@ -40,11 +81,26 @@ </programlisting> </example> </para> + </refsect1> + + <refsect1 role="notes"> + &reftitle.notes; + <note> + <para> + The <function>mysql_num_rows</function> function may be used to + determine the number of tables in the result pointer. + </para> + </note> + </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; <para> - See also - <function>mysql_list_tables</function>, - <function>mysql_field_table</function>, and - <function>mysql_db_name</function>. + <simplelist> + <member><function>mysql_list_tables</function></member> + <member><function>mysql_field_table</function></member> + <member><function>mysql_db_name</function></member> + </simplelist> </para> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc/en/reference/mysql/functions/mysql-thread-id.xml?r1=1.8&r2=1.9&ty=u Index: phpdoc/en/reference/mysql/functions/mysql-thread-id.xml diff -u phpdoc/en/reference/mysql/functions/mysql-thread-id.xml:1.8 phpdoc/en/reference/mysql/functions/mysql-thread-id.xml:1.9 --- phpdoc/en/reference/mysql/functions/mysql-thread-id.xml:1.8 Tue Mar 29 23:07:29 2005 +++ phpdoc/en/reference/mysql/functions/mysql-thread-id.xml Thu Mar 31 02:47:25 2005 @@ -1,24 +1,42 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.8 $ --> -<!-- splitted from ./en/functions/mysql.xml, last change in rev 1.100 --> +<!-- $Revision: 1.9 $ --> <refentry id="function.mysql-thread-id"> <refnamediv> <refname>mysql_thread_id</refname> <refpurpose>Return the current thread ID</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>int</type><methodname>mysql_thread_id</methodname> <methodparam choice="opt"><type>resource</type><parameter>link_identifier</parameter></methodparam> </methodsynopsis> <para> - <function>mysql_thread_id</function> returns the current thread ID. If - the connection is lost and you reconnect with - <function>mysql_ping</function>, the thread ID will change. This means - you should not get the thread ID and store it for later. You should get - it when you need it. + Retrieves the current thread ID. If the connection is lost, and a reconnect + with <function>mysql_ping</function> is executed, the thread ID will + change. This means only retrieve the thread ID when needed. </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + &mysql.linkid.description; + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + The thread ID on success, or &false; on failure. + </para> + </refsect1> + + <refsect1 role="examples"> + &reftitle.examples; <para> <example> <title><function>mysql_thread_id</function> example</title> @@ -33,9 +51,7 @@ ?> ]]> </programlisting> - <para> - The above example would produce the following output: - </para> + &example.outputs.similar; <screen> <![CDATA[ current thread id is 73 @@ -43,10 +59,17 @@ </screen> </example> </para> + </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; <para> - See also - <function>mysql_ping</function> and - <function>mysql_list_processes</function>. + <simplelist> + <member><function>mysql_ping</function></member> + <member><function>mysql_list_processes</function></member> + <member><function>mysql_</function></member> + <member><function>mysql_</function></member> + </simplelist> </para> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc/en/reference/mysql/functions/mysql-unbuffered-query.xml?r1=1.8&r2=1.9&ty=u Index: phpdoc/en/reference/mysql/functions/mysql-unbuffered-query.xml diff -u phpdoc/en/reference/mysql/functions/mysql-unbuffered-query.xml:1.8 phpdoc/en/reference/mysql/functions/mysql-unbuffered-query.xml:1.9 --- phpdoc/en/reference/mysql/functions/mysql-unbuffered-query.xml:1.8 Wed Mar 30 01:27:14 2005 +++ phpdoc/en/reference/mysql/functions/mysql-unbuffered-query.xml Thu Mar 31 02:47:25 2005 @@ -1,16 +1,13 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.8 $ --> -<!-- splitted from ./en/functions/mysql.xml, last change in rev 1.2 --> +<!-- $Revision: 1.9 $ --> <refentry id="function.mysql-unbuffered-query"> <refnamediv> <refname>mysql_unbuffered_query</refname> - <refpurpose> - Send an SQL query to MySQL, without fetching and buffering the - result rows - </refpurpose> + <refpurpose>Send an SQL query to MySQL, without fetching and buffering the result rows</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>resource</type><methodname>mysql_unbuffered_query</methodname> <methodparam><type>string</type><parameter>query</parameter></methodparam> @@ -29,6 +26,42 @@ have to specify the optional parameter <parameter>link_identifier</parameter>. </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>query</parameter></term> + <listitem> + <para> + A SQL query + </para> + </listitem> + </varlistentry> + &mysql.linkid.description; + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + For SELECT, SHOW, DESCRIBE or EXPLAIN statements, + <function>mysql_query</function> + returns a <type>resource</type> on success, or &false; on + error. + </para> + <para> + For other type of SQL statements, UPDATE, DELETE, DROP, etc, + <function>mysql_query</function> returns &true; on success + or &false; on error. + </para> + </refsect1> + + <refsect1 role="notes"> + &reftitle.notes; <note> <para> The benefits of <function>mysql_unbuffered_query</function> come @@ -39,8 +72,14 @@ can send a new SQL query to MySQL. </para> </note> + </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; <para> - See also <function>mysql_query</function>. + <simplelist> + <member><function>mysql_query</function></member> + </simplelist> </para> </refsect1> </refentry>
« previous php.doc (#969367172) next »