georg Fri Feb 20 08:05:10 2004 EDT
Modified files: /phpdoc/en/reference/mysqli/functions mysqli-data-seek.xml mysqli-debug.xml mysqli-disable-reads-from-master.xml mysqli-disable-rpl-parse.xml mysqli-dump-debug-info.xml mysqli-embedded-connect.xml mysqli-enable-reads-from-master.xml mysqli-enable-rpl-parse.xml mysqli-master-query.xml mysqli-rpl-parse-enabled.xml mysqli-rpl-probe.xml mysqli-rpl-query-type.xml mysqli-send-query.xml mysqli-server-end.xml mysqli-server-init.xml Log: - added more samples - marked undocumented functions for embedded server and replication as experimental
http://cvs.php.net/diff.php/phpdoc/en/reference/mysqli/functions/mysqli-data-seek.xml?r1=1.10&r2=1.11&ty=u Index: phpdoc/en/reference/mysqli/functions/mysqli-data-seek.xml diff -u phpdoc/en/reference/mysqli/functions/mysqli-data-seek.xml:1.10 phpdoc/en/reference/mysqli/functions/mysqli-data-seek.xml:1.11 --- phpdoc/en/reference/mysqli/functions/mysqli-data-seek.xml:1.10 Wed Jan 28 18:18:42 2004 +++ phpdoc/en/reference/mysqli/functions/mysqli-data-seek.xml Fri Feb 20 08:05:10 2004 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.10 $ --> +<!-- $Revision: 1.11 $ --> <refentry id="function.mysqli-data-seek"> <refnamediv> <refname>mysqli_data_seek</refname> @@ -43,50 +43,84 @@ </para> </refsect1> <refsect1> + <title>See also</title> + <para> + <function>mysqli_store_result</function>, + <function>mysqli_fetch_row</function>, + <function>mysqli_num_rows</function>. + </para> + </refsect1> + <refsect1> <title>Example</title> <para> <example> - <title>Using the mysqli_data_seek function</title> + <title>Object oriented style</title> <programlisting role="php"> <![CDATA[ <?php - - /* Open a connection */ - $link = mysqli_connect("localhost", "username", "password"); - mysqli_select_db("mydb"); +/* Open a connection */ +$mysqli = new mysqli("localhost", "my_user", "my_password", "test"); + +$mysqli->query( "DROP TABLE IF EXISTS friends"); +$mysqli->query( "CREATE TABLE friends (id int, name varchar(30))"); + +$mysqli->query( "INSERT INTO friends VALUES (1, 'Greant'), + (2, 'Stocker'), (3, 'Rethans'), (4, 'Wendel')"); - /* Get some rows and store them */ - $query = "SELECT DINSTINCT name FROM employee ORDER BY name"; - $result = mysqli_query($query) or die(mysqli_error()); - - $rows = mysqli_store_result($result); - - $total = mysqli_num_fields($rows); - - if ($total > 0) { // there is at least one row - /* Get the last employee */ - mysqli_data_seek($rows, mysqli_num_rows($result) -1); - $employee = mysqli_fetch_row($rows); - printf ("Employee name : %s\n", $employee[0]); - } +/* Get some rows */ +$query = "SELECT name FROM friends ORDER BY name"; +$result = $mysqli->query( $query) or die(mysqli_error($link)); + +$total = $result->field_count; + +if ($total > 0) { // there is at least one row + /* Get the last employee */ + $result->data_seek($result->num_rows -1); + $friend = $result->fetch_row(); + printf ("Friends name : %s\n", $friend[0]); +} - mysqli_free_result($rows); - mysqli_close($link); +$result->close(); +$mysqli->close(); +?> +]]> + </programlisting> + </example> + <example> + <title>Object oriented style</title> + <programlisting role="php"> +<![CDATA[ +<?php +/* Open a connection */ +$link = mysqli_connect("localhost", "my_user", "my_password", "test"); + +mysqli_query($link, "DROP TABLE IF EXISTS friends"); +mysqli_query($link, "CREATE TABLE friends (id int, name varchar(30))"); +mysqli_query($link, "INSERT INTO friends VALUES (1, 'Greant'), + (2, 'Stocker'), (3, 'Rethans'), (4, 'Wendel')"); + +/* Get some rows */ +$query = "SELECT name FROM friends ORDER BY name"; +$result = mysqli_query($link, $query) or die(mysqli_error($link)); + +$total = mysqli_num_fields($result); + +if ($total > 0) { /* there is at least one row */ + /* Get the last employee */ + mysqli_data_seek($result, mysqli_num_rows($result) -1); + $friend = mysqli_fetch_row($result); + printf ("Friends name : %s\n", $friend[0]); +} + +mysqli_free_result($result); +mysqli_close($link); ?> ]]> </programlisting> </example> </para> </refsect1> - <refsect1> - <title>See also</title> - <para> - <function>mysqli_store_result</function>, - <function>mysqli_fetch_row</function>, - <function>mysqli_num_rows</function>. - </para> - </refsect1> </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/diff.php/phpdoc/en/reference/mysqli/functions/mysqli-debug.xml?r1=1.5&r2=1.6&ty=u Index: phpdoc/en/reference/mysqli/functions/mysqli-debug.xml diff -u phpdoc/en/reference/mysqli/functions/mysqli-debug.xml:1.5 phpdoc/en/reference/mysqli/functions/mysqli-debug.xml:1.6 --- phpdoc/en/reference/mysqli/functions/mysqli-debug.xml:1.5 Wed Jan 28 18:18:42 2004 +++ phpdoc/en/reference/mysqli/functions/mysqli-debug.xml Fri Feb 20 08:05:10 2004 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.5 $ --> +<!-- $Revision: 1.6 $ --> <refentry id="function.mysqli-debug"> <refnamediv> <refname>mysqli_debug</refname> @@ -16,6 +16,12 @@ operations using the Fred Fish debugging library. The <parameter>debug</parameter> parameter is a string representing the debugging operation to perform. </para> + <note> + <para> + To use the <function>mysqli_debug</function> function you must complile + the MySQL client library to support debugging. + </para> + </note> </refsect1> <refsect1> <title>Return values</title> @@ -30,8 +36,8 @@ <![CDATA[ <?php - /* Create a trace file in '/tmp/client.trace' on the local (client) machine: */ - mysqli_debug("d:t:0,/tmp/client.trace"); +/* Create a trace file in '/tmp/client.trace' on the local (client) machine: */ +mysqli_debug("d:t:0,/tmp/client.trace"); ?> ]]> http://cvs.php.net/diff.php/phpdoc/en/reference/mysqli/functions/mysqli-disable-reads-from-master.xml?r1=1.2&r2=1.3&ty=u Index: phpdoc/en/reference/mysqli/functions/mysqli-disable-reads-from-master.xml diff -u phpdoc/en/reference/mysqli/functions/mysqli-disable-reads-from-master.xml:1.2 phpdoc/en/reference/mysqli/functions/mysqli-disable-reads-from-master.xml:1.3 --- phpdoc/en/reference/mysqli/functions/mysqli-disable-reads-from-master.xml:1.2 Sun May 25 14:02:46 2003 +++ phpdoc/en/reference/mysqli/functions/mysqli-disable-reads-from-master.xml Fri Feb 20 08:05:10 2004 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.2 $ --> +<!-- $Revision: 1.3 $ --> <refentry id="function.mysqli-disable-reads-from-master"> <refnamediv> <refname>mysqli_disable_reads_from_master</refname> @@ -12,7 +12,7 @@ <methodparam><type>resource</type><parameter>link</parameter></methodparam> </methodsynopsis> - &warn.undocumented.func; + &warn.experimental.func; </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc/en/reference/mysqli/functions/mysqli-disable-rpl-parse.xml?r1=1.4&r2=1.5&ty=u Index: phpdoc/en/reference/mysqli/functions/mysqli-disable-rpl-parse.xml diff -u phpdoc/en/reference/mysqli/functions/mysqli-disable-rpl-parse.xml:1.4 phpdoc/en/reference/mysqli/functions/mysqli-disable-rpl-parse.xml:1.5 --- phpdoc/en/reference/mysqli/functions/mysqli-disable-rpl-parse.xml:1.4 Tue Feb 10 00:15:16 2004 +++ phpdoc/en/reference/mysqli/functions/mysqli-disable-rpl-parse.xml Fri Feb 20 08:05:10 2004 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.4 $ --> +<!-- $Revision: 1.5 $ --> <refentry id="function.mysqli-disable-rpl-parse"> <refnamediv> <refname>mysqli_disable_rpl_parse</refname> @@ -12,7 +12,7 @@ <methodparam><type>object</type><parameter>link</parameter></methodparam> </methodsynopsis> - &warn.undocumented.func; + &warn.experimental.func; </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc/en/reference/mysqli/functions/mysqli-dump-debug-info.xml?r1=1.6&r2=1.7&ty=u Index: phpdoc/en/reference/mysqli/functions/mysqli-dump-debug-info.xml diff -u phpdoc/en/reference/mysqli/functions/mysqli-dump-debug-info.xml:1.6 phpdoc/en/reference/mysqli/functions/mysqli-dump-debug-info.xml:1.7 --- phpdoc/en/reference/mysqli/functions/mysqli-dump-debug-info.xml:1.6 Wed Jan 28 18:18:42 2004 +++ phpdoc/en/reference/mysqli/functions/mysqli-dump-debug-info.xml Fri Feb 20 08:05:10 2004 @@ -1,8 +1,9 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.6 $ --> +<!-- $Revision: 1.7 $ --> <refentry id="function.mysqli-dump-debug-info"> <refnamediv> <refname>mysqli_dump_debug_info</refname> + <refname>mysqli->dump_debug_info</refname> <refpurpose>Dump debugging information into the log</refpurpose> </refnamediv> <refsect1> http://cvs.php.net/diff.php/phpdoc/en/reference/mysqli/functions/mysqli-embedded-connect.xml?r1=1.1&r2=1.2&ty=u Index: phpdoc/en/reference/mysqli/functions/mysqli-embedded-connect.xml diff -u phpdoc/en/reference/mysqli/functions/mysqli-embedded-connect.xml:1.1 phpdoc/en/reference/mysqli/functions/mysqli-embedded-connect.xml:1.2 --- phpdoc/en/reference/mysqli/functions/mysqli-embedded-connect.xml:1.1 Tue Feb 10 00:15:16 2004 +++ phpdoc/en/reference/mysqli/functions/mysqli-embedded-connect.xml Fri Feb 20 08:05:10 2004 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.1 $ --> +<!-- $Revision: 1.2 $ --> <refentry id="function.mysqli-embedded-connect"> <refnamediv> <refname>mysqli_embedded_connect</refname> @@ -12,7 +12,7 @@ <methodparam><type>void</type><parameter></parameter></methodparam> </methodsynopsis> - &warn.undocumented.func; + &warn.experimental.func; </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc/en/reference/mysqli/functions/mysqli-enable-reads-from-master.xml?r1=1.5&r2=1.6&ty=u Index: phpdoc/en/reference/mysqli/functions/mysqli-enable-reads-from-master.xml diff -u phpdoc/en/reference/mysqli/functions/mysqli-enable-reads-from-master.xml:1.5 phpdoc/en/reference/mysqli/functions/mysqli-enable-reads-from-master.xml:1.6 --- phpdoc/en/reference/mysqli/functions/mysqli-enable-reads-from-master.xml:1.5 Tue Feb 10 00:15:16 2004 +++ phpdoc/en/reference/mysqli/functions/mysqli-enable-reads-from-master.xml Fri Feb 20 08:05:10 2004 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.5 $ --> +<!-- $Revision: 1.6 $ --> <refentry id="function.mysqli-enable-reads-from-master"> <refnamediv> <refname>mysqli_enable_reads_from_master</refname> @@ -12,7 +12,7 @@ <methodparam><type>object</type><parameter>link</parameter></methodparam> </methodsynopsis> - &warn.undocumented.func; + &warn.experimental.func; </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc/en/reference/mysqli/functions/mysqli-enable-rpl-parse.xml?r1=1.5&r2=1.6&ty=u Index: phpdoc/en/reference/mysqli/functions/mysqli-enable-rpl-parse.xml diff -u phpdoc/en/reference/mysqli/functions/mysqli-enable-rpl-parse.xml:1.5 phpdoc/en/reference/mysqli/functions/mysqli-enable-rpl-parse.xml:1.6 --- phpdoc/en/reference/mysqli/functions/mysqli-enable-rpl-parse.xml:1.5 Tue Feb 10 00:15:16 2004 +++ phpdoc/en/reference/mysqli/functions/mysqli-enable-rpl-parse.xml Fri Feb 20 08:05:10 2004 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.5 $ --> +<!-- $Revision: 1.6 $ --> <refentry id="function.mysqli-enable-rpl-parse"> <refnamediv> <refname>mysqli_enable_rpl_parse</refname> @@ -12,7 +12,7 @@ <methodparam><type>object</type><parameter>link</parameter></methodparam> </methodsynopsis> - &warn.undocumented.func; + &warn.experimental.func; </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc/en/reference/mysqli/functions/mysqli-master-query.xml?r1=1.4&r2=1.5&ty=u Index: phpdoc/en/reference/mysqli/functions/mysqli-master-query.xml diff -u phpdoc/en/reference/mysqli/functions/mysqli-master-query.xml:1.4 phpdoc/en/reference/mysqli/functions/mysqli-master-query.xml:1.5 --- phpdoc/en/reference/mysqli/functions/mysqli-master-query.xml:1.4 Tue Feb 10 00:15:16 2004 +++ phpdoc/en/reference/mysqli/functions/mysqli-master-query.xml Fri Feb 20 08:05:10 2004 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.4 $ --> +<!-- $Revision: 1.5 $ --> <refentry id="function.mysqli-master-query"> <refnamediv> <refname>mysqli_master_query</refname> @@ -13,7 +13,7 @@ <methodparam><type>string</type><parameter>query</parameter></methodparam> </methodsynopsis> - &warn.undocumented.func; + &warn.experimental.func; </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc/en/reference/mysqli/functions/mysqli-rpl-parse-enabled.xml?r1=1.4&r2=1.5&ty=u Index: phpdoc/en/reference/mysqli/functions/mysqli-rpl-parse-enabled.xml diff -u phpdoc/en/reference/mysqli/functions/mysqli-rpl-parse-enabled.xml:1.4 phpdoc/en/reference/mysqli/functions/mysqli-rpl-parse-enabled.xml:1.5 --- phpdoc/en/reference/mysqli/functions/mysqli-rpl-parse-enabled.xml:1.4 Tue Feb 10 00:15:16 2004 +++ phpdoc/en/reference/mysqli/functions/mysqli-rpl-parse-enabled.xml Fri Feb 20 08:05:10 2004 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.4 $ --> +<!-- $Revision: 1.5 $ --> <refentry id="function.mysqli-rpl-parse-enabled"> <refnamediv> <refname>mysqli_rpl_parse_enabled</refname> @@ -12,7 +12,7 @@ <methodparam><type>object</type><parameter>link</parameter></methodparam> </methodsynopsis> - &warn.undocumented.func; + &warn.experimental.func; </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc/en/reference/mysqli/functions/mysqli-rpl-probe.xml?r1=1.4&r2=1.5&ty=u Index: phpdoc/en/reference/mysqli/functions/mysqli-rpl-probe.xml diff -u phpdoc/en/reference/mysqli/functions/mysqli-rpl-probe.xml:1.4 phpdoc/en/reference/mysqli/functions/mysqli-rpl-probe.xml:1.5 --- phpdoc/en/reference/mysqli/functions/mysqli-rpl-probe.xml:1.4 Tue Feb 10 00:15:16 2004 +++ phpdoc/en/reference/mysqli/functions/mysqli-rpl-probe.xml Fri Feb 20 08:05:10 2004 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.4 $ --> +<!-- $Revision: 1.5 $ --> <refentry id="function.mysqli-rpl-probe"> <refnamediv> <refname>mysqli_rpl_probe</refname> @@ -12,7 +12,7 @@ <methodparam><type>object</type><parameter>link</parameter></methodparam> </methodsynopsis> - &warn.undocumented.func; + &warn.experimental.func; </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc/en/reference/mysqli/functions/mysqli-rpl-query-type.xml?r1=1.4&r2=1.5&ty=u Index: phpdoc/en/reference/mysqli/functions/mysqli-rpl-query-type.xml diff -u phpdoc/en/reference/mysqli/functions/mysqli-rpl-query-type.xml:1.4 phpdoc/en/reference/mysqli/functions/mysqli-rpl-query-type.xml:1.5 --- phpdoc/en/reference/mysqli/functions/mysqli-rpl-query-type.xml:1.4 Tue Feb 10 00:15:16 2004 +++ phpdoc/en/reference/mysqli/functions/mysqli-rpl-query-type.xml Fri Feb 20 08:05:10 2004 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.4 $ --> +<!-- $Revision: 1.5 $ --> <refentry id="function.mysqli-rpl-query-type"> <refnamediv> <refname>mysqli_rpl_query_type</refname> @@ -12,7 +12,7 @@ <methodparam><type>string</type><parameter>query</parameter></methodparam> </methodsynopsis> - &warn.undocumented.func; + &warn.experimental.func; </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc/en/reference/mysqli/functions/mysqli-send-query.xml?r1=1.2&r2=1.3&ty=u Index: phpdoc/en/reference/mysqli/functions/mysqli-send-query.xml diff -u phpdoc/en/reference/mysqli/functions/mysqli-send-query.xml:1.2 phpdoc/en/reference/mysqli/functions/mysqli-send-query.xml:1.3 --- phpdoc/en/reference/mysqli/functions/mysqli-send-query.xml:1.2 Sun May 25 14:02:46 2003 +++ phpdoc/en/reference/mysqli/functions/mysqli-send-query.xml Fri Feb 20 08:05:10 2004 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.2 $ --> +<!-- $Revision: 1.3 $ --> <refentry id="function.mysqli-send-query"> <refnamediv> <refname>mysqli_send_query</refname> @@ -13,7 +13,7 @@ <methodparam><type>string</type><parameter>query</parameter></methodparam> </methodsynopsis> - &warn.undocumented.func; + &warn.experimental.func; </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc/en/reference/mysqli/functions/mysqli-server-end.xml?r1=1.1&r2=1.2&ty=u Index: phpdoc/en/reference/mysqli/functions/mysqli-server-end.xml diff -u phpdoc/en/reference/mysqli/functions/mysqli-server-end.xml:1.1 phpdoc/en/reference/mysqli/functions/mysqli-server-end.xml:1.2 --- phpdoc/en/reference/mysqli/functions/mysqli-server-end.xml:1.1 Tue Feb 10 00:15:16 2004 +++ phpdoc/en/reference/mysqli/functions/mysqli-server-end.xml Fri Feb 20 08:05:10 2004 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.1 $ --> +<!-- $Revision: 1.2 $ --> <refentry id="function.mysqli-server-end"> <refnamediv> <refname>mysqli_server_end</refname> @@ -12,7 +12,7 @@ <void/> </methodsynopsis> - &warn.undocumented.func; + &warn.experimental.func; </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc/en/reference/mysqli/functions/mysqli-server-init.xml?r1=1.1&r2=1.2&ty=u Index: phpdoc/en/reference/mysqli/functions/mysqli-server-init.xml diff -u phpdoc/en/reference/mysqli/functions/mysqli-server-init.xml:1.1 phpdoc/en/reference/mysqli/functions/mysqli-server-init.xml:1.2 --- phpdoc/en/reference/mysqli/functions/mysqli-server-init.xml:1.1 Tue Feb 10 00:15:16 2004 +++ phpdoc/en/reference/mysqli/functions/mysqli-server-init.xml Fri Feb 20 08:05:10 2004 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.1 $ --> +<!-- $Revision: 1.2 $ --> <refentry id="function.mysqli-server-init"> <refnamediv> <refname>mysqli_server_init</refname> @@ -12,7 +12,7 @@ <void/> </methodsynopsis> - &warn.undocumented.func; + &warn.experimental.func; </refsect1> </refentry>