cvs: phpdoc /en/reference/mysqli/functions mysqli-affected-rows.xml mysqli-autocommit.xml mysqli-bind-param.xml mysqli-bind-result.xml
mysqli-change-user.xml mysqli-character-set-name.xml mysqli-close.xml mysqli-commit.xml mysqli-connect.xml mysqli-data-seek.xml mysqli-debug.xml
mysqli-dump-debug-info.xml mysqli-errno.xml mysqli-error.xml mysqli-execute.xml mysqli-fetch-array.xml mysqli-fetch-assoc.xml
mysqli-fetch-field-direct.xml mysqli-fetch-field.xml mysqli-fetch-fields.xml mysqli-fetch-lengths.xml mysqli-fetch-object.xml mysqli-fetch-row.xml
mysqli-fetch.xml mysqli-field-count.xml mysqli-field-seek.xml mysqli-field-tell.xml mysqli-free-result.xml mysqli-get-client-info.xml
mysqli-get-host-info.xml mysqli-get-proto-info.xml mysqli-get-server-info.xml mysqli-get-server-version.xml mysqli-info.xml mysqli-init.xml
mysqli-insert-id.xml mysqli-kill.xml mysqli-num-fields.xml mysqli-num-rows.xml mysqli-options.xml mysqli-param-count.xml mysqli-ping.xml
mysqli-prepare.xml mysqli-query.xml mysqli-real-connect.xml mysqli-real-escape-string.xml mysqli-real-query.xml mysqli-rollback.xml
mysqli-select-db.xml mysqli-send-long-data.xml mysqli-ssl-set.xml mysqli-stat.xml mysqli-stmt-affected-rows.xml mysqli-stmt-close.xml
mysqli-stmt-errno.xml mysqli-stmt-error.xml mysqli-stmt-store-result.xml mysqli-store-result.xml mysqli-thread-id.xml mysqli-thread-safe.xml
mysqli-use-result.xml mysqli-warning-count.xml
| From: | Georg Richter | Date: | Wed, 28 Jan 2004 23:18:43 +0000 |
| Subject: | cvs: phpdoc /en/reference/mysqli/functions mysqli-affected-rows.xml mysqli-autocommit.xml mysqli-bind-param.xml mysqli-bind-result.xml mysqli-change-user.xml mysqli-character-set-name.xml mysqli-close.xml mysqli-commit.xml mysqli-connect.xml mysqli-data-seek.xml mysqli-debug.xml mysqli-dump-debug-info.xml mysqli-errno.xml mysqli-error.xml mysqli-execute.xml mysqli-fetch-array.xml mysqli-fetch-assoc.xml mysqli-fetch-field-direct.xml mysqli-fetch-field.xml mysqli-fetch-fields.xml mysqli-fetch-lengths.xml mysqli-fetch-object.xml mysqli-fetch-row.xml mysqli-fetch.xml mysqli-field-count.xml mysqli-field-seek.xml mysqli-field-tell.xml mysqli-free-result.xml mysqli-get-client-info.xml mysqli-get-host-info.xml mysqli-get-proto-info.xml mysqli-get-server-info.xml mysqli-get-server-version.xml mysqli-info.xml mysqli-init.xml mysqli-insert-id.xml mysqli-kill.xml mysqli-num-fields.xml mysqli-num-rows.xml mysqli-options.xml mysqli-param-count.xml mysqli-ping.xml mysqli-prepare.xml mysqli-query.xml mysqli-real-connect.xml mysqli-real-escape-string.xml mysqli-real-query.xml mysqli-rollback.xml mysqli-select-db.xml mysqli-send-long-data.xml mysqli-ssl-set.xml mysqli-stat.xml mysqli-stmt-affected-rows.xml mysqli-stmt-close.xml mysqli-stmt-errno.xml mysqli-stmt-error.xml mysqli-stmt-store-result.xml mysqli-store-result.xml mysqli-thread-id.xml mysqli-thread-safe.xml mysqli-use-result.xml mysqli-warning-count.xml |
||
| Groups: | php.doc | ||
| Request: | Send a blank email to phpdoc+get-969358528@lists.php.net to get a copy of this message | ||
georg Wed Jan 28 18:18:43 2004 EDT
Modified files:
/phpdoc/en/reference/mysqli/functions mysqli-affected-rows.xml
mysqli-autocommit.xml
mysqli-bind-param.xml
mysqli-bind-result.xml
mysqli-change-user.xml
mysqli-character-set-name.xml
mysqli-close.xml
mysqli-commit.xml
mysqli-connect.xml
mysqli-data-seek.xml
mysqli-debug.xml
mysqli-dump-debug-info.xml
mysqli-errno.xml
mysqli-error.xml
mysqli-execute.xml
mysqli-fetch-array.xml
mysqli-fetch-assoc.xml
mysqli-fetch-field-direct.xml
mysqli-fetch-field.xml
mysqli-fetch-fields.xml
mysqli-fetch-lengths.xml
mysqli-fetch-object.xml
mysqli-fetch-row.xml
mysqli-fetch.xml
mysqli-field-count.xml
mysqli-field-seek.xml
mysqli-field-tell.xml
mysqli-free-result.xml
mysqli-get-client-info.xml
mysqli-get-host-info.xml
mysqli-get-proto-info.xml
mysqli-get-server-info.xml
mysqli-get-server-version.xml
mysqli-info.xml
mysqli-init.xml
mysqli-insert-id.xml
mysqli-kill.xml
mysqli-num-fields.xml
mysqli-num-rows.xml
mysqli-options.xml
mysqli-param-count.xml
mysqli-ping.xml
mysqli-prepare.xml
mysqli-query.xml
mysqli-real-connect.xml
mysqli-real-escape-string.xml
mysqli-real-query.xml
mysqli-rollback.xml
mysqli-select-db.xml
mysqli-send-long-data.xml
mysqli-ssl-set.xml
mysqli-stat.xml
mysqli-stmt-affected-rows.xml
mysqli-stmt-close.xml
mysqli-stmt-errno.xml
mysqli-stmt-error.xml
mysqli-stmt-store-result.xml
mysqli-store-result.xml
mysqli-thread-id.xml
mysqli-thread-safe.xml
mysqli-use-result.xml
mysqli-warning-count.xml
Log:
little docu update
http://cvs.php.net/diff.php/phpdoc/en/reference/mysqli/functions/mysqli-affected-rows.xml?r1=1.11&r2=1.12&ty=u Index: phpdoc/en/reference/mysqli/functions/mysqli-affected-rows.xml diff -u phpdoc/en/reference/mysqli/functions/mysqli-affected-rows.xml:1.11 phpdoc/en/reference/mysqli/functions/mysqli-affected-rows.xml:1.12 --- phpdoc/en/reference/mysqli/functions/mysqli-affected-rows.xml:1.11 Mon Dec 15 11:52:08 2003 +++ phpdoc/en/reference/mysqli/functions/mysqli-affected-rows.xml Wed Jan 28 18:18:42 2004 @@ -1,139 +1,135 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.11 $ --> +<!-- $Revision: 1.12 $ --> <refentry id="function.mysqli-affected-rows"> - <refnamediv> - <refname>mysqli_affected_rows</refname> - <refpurpose>Gets the number of affected rows in a previous MySQL operation</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <methodsynopsis> - <type>mixed</type><methodname>mysqli_affected_rows</methodname> - <methodparam><type>object</type><parameter>link</parameter></methodparam> - </methodsynopsis> - <para> - <function>mysqli_affected_rows</function> returns the number of rows affected by the last - INSERT, UPDATE, or DELETE query associated with the provided <parameter>link</parameter> - parameter. If the last query was invalid, this function will return -1. - </para> - <note> - <para> - When deleting the entire contents of a table (i.e. 'DELETE FROM foo'), this function will - not return the number of rows that were actually deleted. - </para> - </note> - <para> - The <function>mysqli_affected_rows</function> function only works with queries which modify - a table. In order to return the number of rows from a SELECT query, use the - <function>mysqli_num_rows</function> function instead. - </para> - <para> - <example> - <title>Delete-Query</title> - <para>Procedural style:</para> - <programlisting role="php"> -<![CDATA[ -<?php - /* connect to database */ - $link = mysqli_connect("localhost", "mysql_user", "mysql_password", "mydb") or - die("Could not connect: " . mysqli_connect_error()); - - /* this should return the correct numbers of deleted records */ - mysqli_query($link, "DELETE FROM mytable WHERE id < 10"); - printf("Records deleted: %2d\n", mysqli_affected_rows($link)); - - /* without a where clause in a delete statement, it should return 0 */ - mysqli_query($link, "DELETE FROM mytable"); - printf("Records deleted: %2d\n", mysqli_affected_rows($link)); - - /* close connection */ - mysqli_close($link); -?> -]]> - </programlisting> - <para>Object oriented style:</para> - <programlisting role="php"> -<![CDATA[ -<?php - /* connect to database */ - $mysql = mysqli_connect("localhost", "mysql_user", "mysql_password", "mydb") or - die("Could not connect: " . mysqli_connect_error()); - - /* this should return the correct numbers of deleted records */ - $mysql->query("DELETE FROM mytable WHERE id < 10"); - printf ("Records deleted: %2d\n", $mysql->affected_rows()); - - /* without a where clause in a delete statement, it should return 0 */ - $mysql->query("DELETE FROM mytable"); - printf ("Records deleted: %2d\n", $mysql->affected_rows()); - - /* close connection */ - $mysql->close(); -?> -]]> - </programlisting> - <para> - The above examples would produce the following output: - <screen> -<![CDATA[ -Records deleted: 10 -Records deleted: 0 -]]> - </screen> - </para> - </example> - <example> - <title>Update-Query</title> - <para>Procedural style:</para> - <programlisting role="php"> -<![CDATA[ -<?php - /* connect to database */ - $link = mysqli_connect("localhost", "mysql_user", "mysql_password", "mydb") or - die("Could not connect: " . mysqli_connect_error()); - - /* Update records */ - mysqli_query($link, "UPDATE mytable SET used=1 WHERE id < 10"); - printf ("Updated records: %d\n", mysqli_affected_rows($link)); - - /* close connection */ - mysqli_close($link); -?> -]]> - </programlisting> - <para>Object oriented style:</para> - <programlisting role="php"> -<![CDATA[ -<?php - /* connect to database */ - $mysql = mysqli_connect("localhost", "mysql_user", "mysql_password", "mydb") or - die("Could not connect: " . mysqli_connect_error()); - - /* Update records */ - $mysql->query("UPDATE mytable SET used=1 WHERE id < 10"); - printf ("Updated records: %d\n", $mysql->affected_rows($link)); - - /* close connection */ - $mysql->close($link); -?> -]]> - </programlisting> - <para> - The above examples would produce the following output: - <screen> -<![CDATA[ -Updated Records: 10 -]]> - </screen> - </para> - </example> - </para> - <para> - See also: <function>mysqli_num_rows</function>, - <function>mysqli_info</function>. - </para> - </refsect1> - </refentry> + <refnamediv> + <refname>mysqli_affected_rows</refname> + <refname>mysqli->affected_rows</refname> + <refpurpose>Gets the number of affected rows in a previous MySQL operation</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <para>Procedural style:</para> + <methodsynopsis> + <type>mixed</type><methodname>mysqli_affected_rows</methodname> + <methodparam><type>object</type><parameter>link</parameter></methodparam> + </methodsynopsis> + <para>Object oriented style (property):</para> + <classsynopsis> + <ooclass><classname>mysqli</classname></ooclass> + <fieldsynopsis><type>mixed</type><varname>affected_rows</varname></fieldsynopsis> + </classsynopsis> + <para> + <function>mysqli_affected_rows</function> returns the number of rows affected by the last + INSERT, UPDATE, or DELETE query associated with the provided <parameter>link</parameter> + parameter. If the last query was invalid, this function will return -1. + </para> + <note> + <para> + For SELECT statements <function>mysqli_affected_rows</function> works like + <function>mysqli_num_rows</function>. + </para> + </note> + <para> + The <function>mysqli_affected_rows</function> function only works with queries which modify + a table. In order to return the number of rows from a SELECT query, use the + <function>mysqli_num_rows</function> function instead. + </para> + </refsect1> + <refsect1> + <title>Return Values</title> + <para> + An integer greater than zero indicates the number of rows affected or retrieved. + Zero indicates that no records where updated for an UPDATE statement, no rows matched + the WHERE clause in the query or that no query has yet been executed. + -1 indicates that the query returned an error. + </para> + <note> + <para> + If the number of affected rows is greater than maximal int value, the number of affected rows + will be returned as a string. + </para> + </note> + </refsect1> + <refsect1> + <title>Example</title> + <para> + <example> + <title>Example for affected rows</title> + <programlisting role="php"> + <![CDATA[ + <?php + /* + +-----------------------------------------------------------+ + | file: mysqli_affected_rows.php | + +-----------------------------------------------------------+ + | modifies some datasets and returns number of affected | + | rows | + +-----------------------------------------------------------+ + */ + + /* ---- Procedural style ---- */ + $link = mysqli_connect("localhost", "my_user", "my_password", "test") + or die("Can't connect to MySQL server on localhost"); + + /* create table and insert some data */ + mysqli_query($link, "DROP TABLE IF EXISTS affected_rows"); + mysqli_query($link, "CREATE TABLE affected_rows (a int)"); + mysqli_query($link, "INSERT INTO affected_rows VALUES (1),(2),(3),(4)"); + + /* update values and retrieve number of affected rows */ + mysqli_query($link, "UPDATE affected_rows SET a=5 WHERE a=1"); + printf("Affected rows (update): %d\n", mysqli_affected_rows($link)); + + /* delete rows and retrieve number of affected_rows */ + mysqli_query($link, "DELETE FROM affected_rows WHERE a < 4"); + printf("Affected rows (delete): %d\n", mysqli_affected_rows($link)); + + /* select all rows and retrieve number of affected_rows */ + mysqli_query($link, "SELECT a FROM affected_rows"); + printf("Affected rows (select): %d\n", mysqli_affected_rows($link)); + + mysqli_close($link); + + /* ---- Object oriented style ----*/ + $mysqli = new mysqli("localhost", "my_user", "my_password", "test"); + + if (mysqli_connect_errno()) { + printf("Connect failed: %s\n", mysqli_connect_error()); + exit(); + } + + /* create table and insert some data */ + $mysqli->query("DROP TABLE IF EXISTS affected_rows"); + $mysqli->query("CREATE TABLE affected_rows (a int)"); + $mysqli->query("INSERT INTO affected_rows VALUES (1),(2),(3),(4)"); + + /* update values and retrieve number of affected rows */ + $mysqli->query("UPDATE affected_rows SET a=5 WHERE a=1"); + printf("Affected rows (update): %d\n", $mysqli->affected_rows); + + /* delete rows and retrieve number of affected_rows */ + $mysqli->query("DELETE FROM affected_rows WHERE a < 4"); + printf("Affected rows (delete): %d\n", $mysqli->affected_rows); + + /* select all rows and retrieve number of affected_rows */ + $mysqli->query("SELECT a FROM affected_rows"); + printf("Affected rows (select): %d\n", $mysqli->affected_rows); + + $mysqli->close(); + ?> + ]]> + </programlisting> + </example> + </para> + </refsect1> + <refsect1> + <title>See also</title> + <para> + <function>mysqli_num_rows</function>, + <function>mysqli_info</function>. + </para> + </refsect1> +</refentry> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/diff.php/phpdoc/en/reference/mysqli/functions/mysqli-autocommit.xml?r1=1.10&r2=1.11&ty=u Index: phpdoc/en/reference/mysqli/functions/mysqli-autocommit.xml diff -u phpdoc/en/reference/mysqli/functions/mysqli-autocommit.xml:1.10 phpdoc/en/reference/mysqli/functions/mysqli-autocommit.xml:1.11 --- phpdoc/en/reference/mysqli/functions/mysqli-autocommit.xml:1.10 Thu Dec 18 09:14:31 2003 +++ phpdoc/en/reference/mysqli/functions/mysqli-autocommit.xml Wed Jan 28 18:18:42 2004 @@ -1,24 +1,32 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.10 $ --> +<!-- $Revision: 1.11 $ --> <refentry id="function.mysqli-autocommit"> <refnamediv> <refname>mysqli_autocommit</refname> - <refpurpose>Turns on or off auto-committing database modifications</refpurpose> + <refname> mysqli->auto_commit</refname> + <refpurpose>Turns on or off auto-commiting database modifications</refpurpose> </refnamediv> <refsect1> <title>Description</title> + <para>Procedural style:</para> + <methodsynopsis> + <type>bool</type><methodname>mysqli_autocommit</methodname> + <methodparam><type>object</type><parameter>link</parameter></methodparam> + <methodparam><type>bool</type><parameter>mode</parameter></methodparam> + </methodsynopsis> + <para>Object oriented style (method)</para> + <classsynopsis> + <ooclass><classname>mysqli</classname></ooclass> <methodsynopsis> - <type>bool</type><methodname>mysqli_autocommit</methodname> - <methodparam><type>object</type><parameter>link</parameter></methodparam> + <type>bool</type> + <methodname>auto_commit</methodname> <methodparam><type>bool</type><parameter>mode</parameter></methodparam> - </methodsynopsis> + </methodsynopsis> + </classsynopsis> <para> <function>mysqli_autocommit</function> is used to turn on or off auto-commit mode on queries for the database connection represented by the <parameter>link</parameter> - resource. - </para> - <para> - &return.success; + object. </para> <note> <para> @@ -30,67 +38,75 @@ 'SELECT @@autocommit'. </para> </note> + </refsect1> + <refsect1> + <title>Return values</title> + <para> + &return.success; + </para> + </refsect1> + <refsect1> + <title>Example</title> <para> <example> <title>Using the mysqli_autocommit function</title> - <para>Procedural style:</para> <programlisting role="php"> <![CDATA[ <?php +/* + +-----------------------------------------------------------+ + | file: mysqli_autocommit.php | + +-----------------------------------------------------------+ + | connects to MySQL server on localhost, turns autocommit | + | on and retrieves autocommit variable | + +-----------------------------------------------------------+ +*/ + + /* ---- Procedural style ---- */ + $link = mysqli_connect("localhost", "my_user", "my_password", "test") + or die("Can't connect to MySQL server on localhost"); + + /* turn autocommit on */ + mysqli_autocommit($link, TRUE); + + if ($result = mysqli_query($link, "SELECT @@autocommit")) { + $row = mysqli_fetch_row($result); + printf("Autocommit is %s\n", $row[0]); + mysqli_free_result($result); + } + + mysqli_close($link); + + /* ---- Object oriented style ----*/ + $mysqli = new mysqli("localhost", "my_user", "my_password", "test"); + + if (mysqli_connect_errno()) { + printf("Connect failed: %s\n", mysqli_connect_error()); + exit(); + } + + /* turn autocommit on */ + $mysqli->autocommit(TRUE); + + if ($result = $mysqli->query("SELECT @@autocommit")) { + $row = $result->fetch_row(); + printf("Autocommit is %s\n", $row[0]); + $result->free(); + } - /* Open a connection */ - $link = mysqli_connect("localhost", "user", "pass", "mydb"); - - /* Turn on autocommit */ - mysqli_autocommit($link, true); - - /* determine current autocommit status */ - if ($result = mysqli_query($link, "SELECT @@autocommit")) { - $row = mysqli_fetch_row($result); - mysqli_free_result($result); - printf("Autocommit is %d\n", $row[0]); - } - - /* close connection */ - mysqli_close($link); + $mysqli->close(); ?> -]]> - </programlisting> - <para>Object oriented style:</para> - <programlisting role="php"> -<![CDATA[ -<?php - /* Open a connection */ - $mysql = mysqli_connect("localhost", "user", "pass", "mydb"); - - /* Turn on autocommit */ - $mysql->autocommit(true); - - /* determine current autocommit status */ - if ($result = $mysql->query($link, "SELECT @@autocommit")) { - $row = $result->fetch_row($result); - printf ("Autocommit is %d\n", $row[0]); - $result->free(); - } - - /* close connection */ - $mysql->close(); ?> ]]> </programlisting> - <para> - The above examples would produce the following output: - <screen> -<![CDATA[ -Autocommit is 1 -]]> - </screen> - </para> </example> </para> + </refsect1> + <refsect1> + <title>See also</title> <para> - See also <function>mysqli_commit</function>, + <function>mysqli_commit</function>, <function>mysqli_rollback</function>. </para> </refsect1> http://cvs.php.net/diff.php/phpdoc/en/reference/mysqli/functions/mysqli-bind-param.xml?r1=1.3&r2=1.4&ty=u Index: phpdoc/en/reference/mysqli/functions/mysqli-bind-param.xml diff -u phpdoc/en/reference/mysqli/functions/mysqli-bind-param.xml:1.3 phpdoc/en/reference/mysqli/functions/mysqli-bind-param.xml:1.4 --- phpdoc/en/reference/mysqli/functions/mysqli-bind-param.xml:1.3 Thu Dec 11 10:42:02 2003 +++ phpdoc/en/reference/mysqli/functions/mysqli-bind-param.xml Wed Jan 28 18:18:42 2004 @@ -1,19 +1,32 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.3 $ --> +<!-- $Revision: 1.4 $ --> <refentry id="function.mysqli-bind-param"> <refnamediv> <refname>mysqli_bind_param</refname> + <refname>stmt->bind_param</refname> <refpurpose>Binds variables to a prepared statement as parameters</refpurpose> </refnamediv> <refsect1> <title>Description</title> + <para>Procedural style:</para> + <methodsynopsis> + <type>bool</type><methodname>mysqli_bind_param</methodname> + <methodparam><type>object</type><parameter>stmt</parameter></methodparam> + <methodparam><type>array</type><parameter>types</parameter></methodparam> + <methodparam><type>mixed</type><parameter>var1</parameter></methodparam> + <methodparam choice="opt"><type>mixed</type><parameter>var2, ...</parameter></methodparam> + </methodsynopsis> + <para>Object oriented style (method):</para> + <classsynopsis> + <ooclass><classname>stmt</classname></ooclass> <methodsynopsis> - <type>bool</type><methodname>mysqli_bind_param</methodname> - <methodparam><type>object</type><parameter>stmt</parameter></methodparam> + <type>bool</type> + <methodname>bind_param</methodname> <methodparam><type>array</type><parameter>types</parameter></methodparam> <methodparam><type>mixed</type><parameter>var1</parameter></methodparam> <methodparam choice="opt"><type>mixed</type><parameter>var2, ...</parameter></methodparam> </methodsynopsis> + </classsynopsis> <para> <function>mysql_bind_param</function> is used to bind variables for the parameter markers in the SQL statement that was passed to @@ -33,13 +46,22 @@ parameters in the statement. </para> </note> - <example> - <title>Prepared statements</title> - <para>Procedural style:</para> - <programlisting role="php"> + </refsect1> + <refsect1> + <title>Return values</title> + <para> + &return.success; + </para> + </refsect1> + <refsect1> + <title>Example</title> + <example> + <title>Prepared statements</title> + <programlisting role="php"> <![CDATA[ <?php - /* connect to database */ + + /* --- procedural style --- */ $link = mysqli_connect("localhost", "mysql_user", "mysql_password", "mydb") or die("Could not connect: " . mysqli_connect_error()); @@ -62,16 +84,8 @@ mysqli_close_stmt(stmt); mysqli_close(link); -?> -]]> - </programlisting> - <para>Object oriented style:</para> - <programlisting role="php"> -<![CDATA[ -<?php - /* connect to database */ - $mysql = mysqli_connect("localhost", "mysql_user", "mysql_password", "mydb") or - die("Could not connect: " . mysqli_connect_error()); + /* --- object oriented style --- */ + $mysql = new mysqli("localhost", "mysql_user", "mysql_password", "mydb"); /* create mytable */ $mysql->query("CREATE TABLE mytable (a int, b int, c varchar(30))"); @@ -95,13 +109,18 @@ ]]> </programlisting> </example> + </refsect1> + <refsect1> + <title>See also</title> <para> - See also: <function>mysqli_bind_result</function>, + <function>mysqli_bind_result</function>, <function>mysqli_execute</function>, - <function>mysqli_fetch</function> + <function>mysqli_fetch</function>, <!-- <function>mysqli_fetch_column</function> --> - <function>mysqli_prepare</function> - <function>mysqli_send_long_data</function> + <function>mysqli_prepare</function>, + <function>mysqli_send_long_data</function>, + <function>mysqli_stmt_errno</function>, + <function>mysqli_stmt_error</function> </para> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc/en/reference/mysqli/functions/mysqli-bind-result.xml?r1=1.1&r2=1.2&ty=u Index: phpdoc/en/reference/mysqli/functions/mysqli-bind-result.xml diff -u phpdoc/en/reference/mysqli/functions/mysqli-bind-result.xml:1.1 phpdoc/en/reference/mysqli/functions/mysqli-bind-result.xml:1.2 --- phpdoc/en/reference/mysqli/functions/mysqli-bind-result.xml:1.1 Sun May 25 16:48:07 2003 +++ phpdoc/en/reference/mysqli/functions/mysqli-bind-result.xml Wed Jan 28 18:18:42 2004 @@ -1,21 +1,64 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.1 $ --> +<!-- $Revision: 1.2 $ --> <refentry id="function.mysqli-bind-result"> <refnamediv> <refname>mysqli_bind_result</refname> + <refname>stmt->bind_result</refname> <refpurpose>Binds variables to a prepared statement for result storage</refpurpose> </refnamediv> <refsect1> <title>Description</title> + <para>Procedural style:</para> <methodsynopsis> <type>bool</type><methodname>mysqli_bind_result</methodname> - <methodparam><type>resource</type><parameter>stmt</parameter></methodparam> - <methodparam><type>mixed</type><parameter>var</parameter></methodparam> - <methodparam><type>int</type><parameter>len</parameter></methodparam> + <methodparam><type>object</type><parameter>stmt</parameter></methodparam> + <methodparam><type>mixed</type><parameter>var1</parameter></methodparam> + <methodparam choice="opt"><type>mixed</type><parameter>var2, ...</parameter></methodparam> </methodsynopsis> - - &warn.undocumented.func; - + <para>Object oriented style (method):</para> + <classsynopsis> + <ooclass><classname>stmt</classname></ooclass> + <methodsynopsis> + <type>bool</type> + <methodname>bind_result</methodname> + <methodparam><type>mixed</type><parameter>var1</parameter></methodparam> + <methodparam choice="opt"><type>mixed</type><parameter>var2, ...</parameter></methodparam> + </methodsynopsis> + </classsynopsis> + <para> + <function>mysqli_bind_result</function> is used to associate (bind) columns in the result + set to variables. When <function>mysqli_fetch</function> is called to fetch data, the MySQL + client/server protocol places the data for the bound columns into the specified variables + <parameter>var1, ...</parameter>. + </para> + <note> + <para> + Note that all columns must be bound prior to calling <function>mysqli_fetch</function>. + Depending on column types bound variables can silently change to the corresponding PHP type. + </para> + <para> + A column can be bound or rebound at any time, even after a result set has been partially retrieved. + The new binding takes effect the next time <function>mysqli_fetch</function> is called. + </para> + </note> + </refsect1> + <refsect1> + <title>Return values</title> + <para> + &return.success; + </para> + </refsect1> + <refsect1> + <title>See also</title> + <para> + <function>mysqli_bind_param</function>, + <function>mysqli_execute</function>, + <function>mysqli_fetch</function>, +<!-- <function>mysqli_fetch_column</function> --> + <function>mysqli_prepare</function>, + <function>mysqli_stmt_errno</function>, + <function>mysqli_stmt_error</function> + </para> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc/en/reference/mysqli/functions/mysqli-change-user.xml?r1=1.6&r2=1.7&ty=u Index: phpdoc/en/reference/mysqli/functions/mysqli-change-user.xml diff -u phpdoc/en/reference/mysqli/functions/mysqli-change-user.xml:1.6 phpdoc/en/reference/mysqli/functions/mysqli-change-user.xml:1.7 --- phpdoc/en/reference/mysqli/functions/mysqli-change-user.xml:1.6 Sun May 25 15:27:11 2003 +++ phpdoc/en/reference/mysqli/functions/mysqli-change-user.xml Wed Jan 28 18:18:42 2004 @@ -1,28 +1,38 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.6 $ --> +<!-- $Revision: 1.7 $ --> <refentry id="function.mysqli-change-user"> <refnamediv> <refname>mysqli_change_user</refname> + <refname>mysqli->change_user</refname> <refpurpose>Changes the user of the specified database connection</refpurpose> </refnamediv> <refsect1> <title>Description</title> + <para>Procedural style:</para> + <methodsynopsis> + <type>bool</type><methodname>mysqli_change_user</methodname> + <methodparam><type>object</type><parameter>link</parameter></methodparam> + <methodparam><type>string</type><parameter>user</parameter></methodparam> + <methodparam><type>string</type><parameter>password</parameter></methodparam> + <methodparam><type>string</type><parameter>database</parameter></methodparam> + </methodsynopsis> + <para>Object oriented style (method):</para> + <classsynopsis> + <ooclass><classname>mysqli</classname></ooclass> <methodsynopsis> - <type>bool</type><methodname>mysqli_change_user</methodname> - <methodparam><type>resource</type><parameter>link</parameter></methodparam> + <type>bool</type> + <methodname>change_user</methodname> <methodparam><type>string</type><parameter>user</parameter></methodparam> <methodparam><type>string</type><parameter>password</parameter></methodparam> <methodparam><type>string</type><parameter>database</parameter></methodparam> </methodsynopsis> + </classsynopsis> <para> <function>mysqli_change_user</function> is used to change the user of the specified database connection as given by the <parameter>link</parameter> parameter and to set the current database to that specified by the <parameter>database</parameter> parameter. </para> <para> - &return.success; - </para> - <para> If desired, the &null; value may be passed in place of the <parameter>database</parameter> parameter resulting in only changing the user and not selecting a database. To select a database in this case use the <function>mysqli_select_db</function> function. @@ -41,6 +51,15 @@ closing all temporary tables, and unlocking all locked tables. </para> </note> + </refsect1> + <refsect1> + <title>Return Values</title> + <para> + &return.success; + </para> + </refsect1> + <refsect1> + <title>Example</title> <para> <example> <title>Using the mysqli_change_user function</title> http://cvs.php.net/diff.php/phpdoc/en/reference/mysqli/functions/mysqli-character-set-name.xml?r1=1.6&r2=1.7&ty=u Index: phpdoc/en/reference/mysqli/functions/mysqli-character-set-name.xml diff -u phpdoc/en/reference/mysqli/functions/mysqli-character-set-name.xml:1.6 phpdoc/en/reference/mysqli/functions/mysqli-character-set-name.xml:1.7 --- phpdoc/en/reference/mysqli/functions/mysqli-character-set-name.xml:1.6 Mon Dec 15 11:52:08 2003 +++ phpdoc/en/reference/mysqli/functions/mysqli-character-set-name.xml Wed Jan 28 18:18:42 2004 @@ -1,21 +1,38 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.6 $ --> +<!-- $Revision: 1.7 $ --> <refentry id="function.mysqli-character-set-name"> <refnamediv> <refname>mysqli_character_set_name</refname> + <refname>mysqli->character_set_name</refname> <refpurpose>Returns the default character set for the database connection</refpurpose> </refnamediv> <refsect1> <title>Description</title> + <para>Procedural style:</para> <methodsynopsis> <type>string</type><methodname>mysqli_character_set_name</methodname> - <methodparam><type>resource</type><parameter>link</parameter></methodparam> + <methodparam><type>object</type><parameter>link</parameter></methodparam> </methodsynopsis> + <para>Object oriented style (method):</para> + <classsynopsis> + <ooclass><classname>mysqli</classname></ooclass> + <methodsynopsis> + <type>string</type> + <methodname>character_set_name</methodname> + <methodparam><type>void</type><parameter></parameter></methodparam> + </methodsynopsis> + </classsynopsis> <para> Returns the current character set for the database connection specified by the <parameter>link</parameter> parameter. </para> - <para> + </refsect1> + <refsect1> + <title>Return values</title> + <para>The default character set for the current connection</para> + </refsect1> + <refsect1> + <title>Example</title> <example> <title>Using the mysqli_character_set_name function</title> <programlisting role="php"> @@ -27,17 +44,19 @@ /* Print current character set */ $charset = mysqli_character_set_name($link); - echo "Current character set is $charset\n"; + printf ("Current character set is %s\n",$charset); ?> ]]> </programlisting> </example> - </para> - <para> - See also <function>mysqli_real_escape_string</function>. - </para> - </refsect1> + </refsect1> + <refsect1> + <title>See also</title> + <para> + <function>mysqli_real_escape_string</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-close.xml?r1=1.4&r2=1.5&ty=u Index: phpdoc/en/reference/mysqli/functions/mysqli-close.xml diff -u phpdoc/en/reference/mysqli/functions/mysqli-close.xml:1.4 phpdoc/en/reference/mysqli/functions/mysqli-close.xml:1.5 --- phpdoc/en/reference/mysqli/functions/mysqli-close.xml:1.4 Sun May 25 15:09:28 2003 +++ phpdoc/en/reference/mysqli/functions/mysqli-close.xml Wed Jan 28 18:18:42 2004 @@ -1,23 +1,43 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.4 $ --> +<!-- $Revision: 1.5 $ --> <refentry id="function.mysqli-close"> <refnamediv> <refname>mysqli_close</refname> + <refname>mysqli->close</refname> <refpurpose>Closes a previously opened database connection</refpurpose> </refnamediv> <refsect1> <title>Description</title> + <para>Procedural style:</para> + <methodsynopsis> + <type>bool</type><methodname>mysqli_close</methodname> + <methodparam><type>object</type><parameter>link</parameter></methodparam> + </methodsynopsis> + <para>Object oriented style (method):</para> + <classsynopsis> + <ooclass><classname>mysqli</classname></ooclass> <methodsynopsis> - <type>bool</type><methodname>mysqli_close</methodname> - <methodparam><type>resource</type><parameter>link</parameter></methodparam> + <type>bool</type> + <methodname>close</methodname> + <methodparam><type>void</type><parameter></parameter></methodparam> </methodsynopsis> + </classsynopsis> <para> The <function>mysqli_close</function> function closes a previously opened database - connection specified by the <parameter>link</parameter> parameter. + connection specified by the link parameter. </para> + </refsect1> + <refsect1> + <title>Return values</title> + <para> + &return.success; + </para> + </refsect1> + <refsect1> + <title>See also</title> <para> - See also - <function>mysqli_connect</function> and + <function>mysqli_connect</function>, + <function>mysqli_init</function>, <function>mysqli_real_connect</function>. </para> </refsect1> http://cvs.php.net/diff.php/phpdoc/en/reference/mysqli/functions/mysqli-commit.xml?r1=1.3&r2=1.4&ty=u Index: phpdoc/en/reference/mysqli/functions/mysqli-commit.xml diff -u phpdoc/en/reference/mysqli/functions/mysqli-commit.xml:1.3 phpdoc/en/reference/mysqli/functions/mysqli-commit.xml:1.4 --- phpdoc/en/reference/mysqli/functions/mysqli-commit.xml:1.3 Sun May 25 15:09:28 2003 +++ phpdoc/en/reference/mysqli/functions/mysqli-commit.xml Wed Jan 28 18:18:42 2004 @@ -1,23 +1,43 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.3 $ --> +<!-- $Revision: 1.4 $ --> <refentry id="function.mysqli-commit"> <refnamediv> <refname>mysqli_commit</refname> + <refname>mysqli->commit</refname> <refpurpose>Commits the current transaction</refpurpose> </refnamediv> <refsect1> <title>Description</title> + <para>Procedural style:</para> + <methodsynopsis> + <type>bool</type><methodname>mysqli_commit</methodname> + <methodparam><type>object</type><parameter>link</parameter></methodparam> + </methodsynopsis> + <para>Object oriented style (method)</para> + <classsynopsis> + <ooclass><classname>mysqli</classname></ooclass> <methodsynopsis> - <type>bool</type><methodname>mysqli_commit</methodname> - <methodparam><type>resource</type><parameter>link</parameter></methodparam> + <type>bool</type> + <methodname>commit</methodname> + <methodparam><type>void</type><parameter></parameter></methodparam> </methodsynopsis> + </classsynopsis> <para> Commits the current transaction for the database specified by the <parameter>link</parameter> parameter. </para> + </refsect1> + <refsect1> + <title>Return values</title> + <para> + &return.success; + </para> + </refsect1> + <refsect1> + <title>See also</title> <para> - See also <function>mysqli_autocommit</function>, - <function>mysqli_rollback</function>. + <function>mysqli_autocommit</function>, + <function>mysqli_rollback</function>. </para> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc/en/reference/mysqli/functions/mysqli-connect.xml?r1=1.6&r2=1.7&ty=u Index: phpdoc/en/reference/mysqli/functions/mysqli-connect.xml diff -u phpdoc/en/reference/mysqli/functions/mysqli-connect.xml:1.6 phpdoc/en/reference/mysqli/functions/mysqli-connect.xml:1.7 --- phpdoc/en/reference/mysqli/functions/mysqli-connect.xml:1.6 Sun May 25 15:27:11 2003 +++ phpdoc/en/reference/mysqli/functions/mysqli-connect.xml Wed Jan 28 18:18:42 2004 @@ -1,27 +1,42 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.6 $ --> +<!-- $Revision: 1.7 $ --> <refentry id="function.mysqli-connect"> <refnamediv> <refname>mysqli_connect</refname> + <refname>mysqli()</refname> <refpurpose>Open a new connection to the MySQL server</refpurpose> </refnamediv> <refsect1> <title>Description</title> - <methodsynopsis> - <type>resource</type><methodname>mysqli_connect</methodname> + <para>Procedural style</para> + <methodsynopsis> + <type>object</type><methodname>mysqli_connect</methodname> + <methodparam choice='opt'><type>string</type><parameter>hostname</parameter></methodparam> + <methodparam choice='opt'><type>string</type><parameter>username</parameter></methodparam> + <methodparam choice='opt'><type>string</type><parameter>passwd</parameter></methodparam> + <methodparam choice='opt'><type>string</type><parameter>dbname</parameter></methodparam> + <methodparam choice='opt'><type>int</type><parameter>port</parameter></methodparam> + <methodparam choice='opt'><type>string</type><parameter>socket</parameter></methodparam> + </methodsynopsis> + <para>Object oriented style (constructor):</para> + <classsynopsis> + <ooclass><classname>mysqli</classname></ooclass> + <constructorsynopsis> + <methodname></methodname> <methodparam choice='opt'><type>string</type><parameter>hostname</parameter></methodparam> <methodparam choice='opt'><type>string</type><parameter>username</parameter></methodparam> <methodparam choice='opt'><type>string</type><parameter>passwd</parameter></methodparam> <methodparam choice='opt'><type>string</type><parameter>dbname</parameter></methodparam> <methodparam choice='opt'><type>int</type><parameter>port</parameter></methodparam> <methodparam choice='opt'><type>string</type><parameter>socket</parameter></methodparam> - </methodsynopsis> + </constructorsynopsis> + </classsynopsis> <para> The <function>mysqli_connect</function> function attempts to open a connection to the MySQL Server running on <parameter>host</parameter> which can be either a hostname or an IP address. Passing the &null; value or the string "localhost" to this parameter, the local host is assumed. When possible, pipes will be used instead of the TCP/IP protocol. If successful, the <function>mysqli_connect</function> - will return a resource representing the connection to the database, or &false; on failure. + will return an object representing the connection to the database, or &false; on failure. </para> <para> The <parameter>username</parameter> and <parameter>password</parameter> parameters specify the @@ -48,24 +63,61 @@ MySQL database is determined by the <parameter>host</parameter> parameter. </para> </note> + </refsect1> + <refsect1> + <title>Return values</title> + <para> + Returns a object which represents the connection to a MySQL Server or &false if the connection failed. + </para> + </refsect1> + <refsect1> + <title>Example</title> <para> <example> <title>Using the mysqli_connect function</title> <programlisting role="php"> <![CDATA[ <?php - -/* Open a connection as foo@localhost and make bar the default database */ -$link = mysqli_connect("localhost", "foo", "password", "bar"); +/* + +-----------------------------------------------------------+ + | file: mysqli_connect.php | + +-----------------------------------------------------------+ + | connects to MySQL server on localhost and prints host | + | information | + +-----------------------------------------------------------+ +*/ + + /* ---- Procedural style ---- */ + $link = mysqli_connect("localhost", "my_user", "my_password", "test") + or die("Can't connect to MySQL server on localhost"); + + printf("Host information: %s\n", mysqli_get_host_info($link)); -?> + mysqli_close($link); + + /* ---- Object oriented style ----*/ + $mysqli = new mysqli("localhost", "my_user", "my_password", "test"); + + if (mysqli_connect_errno()) { + printf("Connect failed: %s\n", mysqli_connect_error()); + exit(); + } + + printf("Host information: %s\n", $mysqli->host_info); + + $mysqli->close(); +?> ]]> </programlisting> </example> </para> + </refsect1> + <refsect1> + <title>See also</title> <para> - See also - <function>mysqli_close</function> and + <function>mysqli_close</function>, + <function>mysqli_init</function>, + <function>mysqli_options</function> <function>mysqli_real_connect</function>. </para> </refsect1> http://cvs.php.net/diff.php/phpdoc/en/reference/mysqli/functions/mysqli-data-seek.xml?r1=1.9&r2=1.10&ty=u Index: phpdoc/en/reference/mysqli/functions/mysqli-data-seek.xml diff -u phpdoc/en/reference/mysqli/functions/mysqli-data-seek.xml:1.9 phpdoc/en/reference/mysqli/functions/mysqli-data-seek.xml:1.10 --- phpdoc/en/reference/mysqli/functions/mysqli-data-seek.xml:1.9 Thu Dec 18 09:14:31 2003 +++ phpdoc/en/reference/mysqli/functions/mysqli-data-seek.xml Wed Jan 28 18:18:42 2004 @@ -1,17 +1,28 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.9 $ --> +<!-- $Revision: 1.10 $ --> <refentry id="function.mysqli-data-seek"> <refnamediv> <refname>mysqli_data_seek</refname> - <refpurpose>Adjusts the result pointer to an arbitrary row in the result</refpurpose> + <refname>result->data_seek</refname> + <refpurpose>Adjusts the result pointer to an arbitary row in the result</refpurpose> </refnamediv> <refsect1> <title>Description</title> + <para>Procedural style:</para> + <methodsynopsis> + <type>bool</type><methodname>mysqli_data_seek</methodname> + <methodparam><type>object</type><parameter>result</parameter></methodparam> + <methodparam><type>int</type><parameter>offset</parameter></methodparam> + </methodsynopsis> + <para>Object oriented style (method):</para> + <classsynopsis> + <ooclass><classname>result</classname></ooclass> <methodsynopsis> - <type>void</type><methodname>mysqli_data_seek</methodname> - <methodparam><type>resource</type><parameter>result</parameter></methodparam> + <type>bool</type> + <methodname>data_seek</methodname> <methodparam><type>int</type><parameter>offset</parameter></methodparam> </methodsynopsis> + </classsynopsis> <para> The <function>mysqli_data_seek</function> function seeks to an arbitrary result pointer specified by the <parameter>offset</parameter> in the result set represented by @@ -20,10 +31,19 @@ </para> <note> <para> - This function can only be used with results attained from the use of the - <function>mysqli_store_result</function> function. + This function can only be used with unbuffered results attained from the use of the + <function>mysqli_store_result</function> or <function>mysqli_query</function> functions. </para> </note> + </refsect1> + <refsect1> + <title>Return values</title> + <para> + &return.success; + </para> + </refsect1> + <refsect1> + <title>Example</title> <para> <example> <title>Using the mysqli_data_seek function</title> @@ -47,20 +67,23 @@ /* 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]); + printf ("Employee name : %s\n", $employee[0]); } mysqli_free_result($rows); + mysqli_close($link); ?> ]]> </programlisting> </example> </para> + </refsect1> + <refsect1> + <title>See also</title> <para> - See also <function>mysqli_store_result</function>, - <function>mysqli_fetch_row</function> and + <function>mysqli_fetch_row</function>, <function>mysqli_num_rows</function>. </para> </refsect1> http://cvs.php.net/diff.php/phpdoc/en/reference/mysqli/functions/mysqli-debug.xml?r1=1.4&r2=1.5&ty=u Index: phpdoc/en/reference/mysqli/functions/mysqli-debug.xml diff -u phpdoc/en/reference/mysqli/functions/mysqli-debug.xml:1.4 phpdoc/en/reference/mysqli/functions/mysqli-debug.xml:1.5 --- phpdoc/en/reference/mysqli/functions/mysqli-debug.xml:1.4 Sun May 25 15:27:11 2003 +++ phpdoc/en/reference/mysqli/functions/mysqli-debug.xml Wed Jan 28 18:18:42 2004 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.4 $ --> +<!-- $Revision: 1.5 $ --> <refentry id="function.mysqli-debug"> <refnamediv> <refname>mysqli_debug</refname> @@ -16,6 +16,13 @@ operations using the Fred Fish debugging library. The <parameter>debug</parameter> parameter is a string representing the debugging operation to perform. </para> + </refsect1> + <refsect1> + <title>Return values</title> + <para><function>mysqli_debug</function> doesn't return any value.</para> + </refsect1> + <refsect1> + <title>Example</title> <para> <example> <title>Generating a Trace File</title> @@ -32,6 +39,12 @@ </example> </para> </refsect1> + <refsect1> + <title>See also</title> + <para> + <function>mysqli_dump_debug_info</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-dump-debug-info.xml?r1=1.5&r2=1.6&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.5 phpdoc/en/reference/mysqli/functions/mysqli-dump-debug-info.xml:1.6 --- phpdoc/en/reference/mysqli/functions/mysqli-dump-debug-info.xml:1.5 Thu Dec 18 09:14:31 2003 +++ phpdoc/en/reference/mysqli/functions/mysqli-dump-debug-info.xml Wed Jan 28 18:18:42 2004 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.5 $ --> +<!-- $Revision: 1.6 $ --> <refentry id="function.mysqli-dump-debug-info"> <refnamediv> <refname>mysqli_dump_debug_info</refname> @@ -9,17 +9,26 @@ <title>Description</title> <methodsynopsis> <type>bool</type><methodname>mysqli_dump_debug_info</methodname> - <methodparam><type>resource</type><parameter>link</parameter></methodparam> + <methodparam><type>object</type><parameter>link</parameter></methodparam> </methodsynopsis> <para> - This function is designed to be executed by an user with the SUPER privilege and + This function is designed to be executed by an user with the SUPER privlege and is used to dump debugging information into the log for the MySQL Server relating to the connection specified by the <parameter>link</parameter> parameter. </para> + </refsect1> + <refsect1> + <title>Return values</title> <para> &return.success; </para> </refsect1> + <refsect1> + <title>See also</title> + <para> + <function>mysqli_debug</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-errno.xml?r1=1.5&r2=1.6&ty=u Index: phpdoc/en/reference/mysqli/functions/mysqli-errno.xml diff -u phpdoc/en/reference/mysqli/functions/mysqli-errno.xml:1.5 phpdoc/en/reference/mysqli/functions/mysqli-errno.xml:1.6 --- phpdoc/en/reference/mysqli/functions/mysqli-errno.xml:1.5 Thu Dec 18 09:14:31 2003 +++ phpdoc/en/reference/mysqli/functions/mysqli-errno.xml Wed Jan 28 18:18:42 2004 @@ -1,30 +1,48 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.5 $ --> +<!-- $Revision: 1.6 $ --> <refentry id="function.mysqli-errno"> <refnamediv> <refname>mysqli_errno</refname> + <refname>mysql->errno</refname> <refpurpose>Returns the error code for the most recent function call</refpurpose> </refnamediv> <refsect1> <title>Description</title> + <para>Procedural style:</para> <methodsynopsis> <type>int</type><methodname>mysqli_errno</methodname> - <methodparam><type>resource</type><parameter>link</parameter></methodparam> + <methodparam><type>object</type><parameter>link</parameter></methodparam> </methodsynopsis> + <para>Object oriented style (property):</para> + <classsynopsis> + <ooclass><classname>mysqli</classname></ooclass> + <fieldsynopsis><type>int</type><varname>errno</varname></fieldsynopsis> + </classsynopsis> <para> The <function>mysqli_errno</function> function will return the last error code for the most recent MySQLi function call that can succeed or fail with respect to the database link defined by the <parameter>link</parameter> parameter. If no errors - have occurred, this function will return zero. + have occured, this function will return zero. </para> <note> <para> - A complete list of the error codes and their meanings can be found in the constants - section of the MySQLi documentation + Client error message numbers are listed in the MySQL <filename>errmsg.h</filename> header file, + server error message numbers are listed in <filename>mysqld_error.h</filename>. + In the MySQL source distribution you can find a complete list of error messages and error numbers + in the file <filename>Docs/mysqld_error.txt</filename>. </para> </note> + </refsect1> + <refsect1> + <title>Return values</title> + <para> + An error code value for the last call, if it failed. zero means no error occurred. + </para> + </refsect1> + <refsect1> + <title>See also</title> <para> - See also <function>mysqli_error</function>. + <function>mysqli_error</function>, <function>mysqli_sqlstate</function> </para> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc/en/reference/mysqli/functions/mysqli-error.xml?r1=1.7&r2=1.8&ty=u Index: phpdoc/en/reference/mysqli/functions/mysqli-error.xml diff -u phpdoc/en/reference/mysqli/functions/mysqli-error.xml:1.7 phpdoc/en/reference/mysqli/functions/mysqli-error.xml:1.8 --- phpdoc/en/reference/mysqli/functions/mysqli-error.xml:1.7 Thu Dec 18 09:14:31 2003 +++ phpdoc/en/reference/mysqli/functions/mysqli-error.xml Wed Jan 28 18:18:42 2004 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.7 $ --> +<!-- $Revision: 1.8 $ --> <refentry id="function.mysqli-error"> <refnamediv> <refname>mysqli_error</refname> @@ -7,18 +7,33 @@ </refnamediv> <refsect1> <title>Description</title> + <para>Procedural style:</para> <methodsynopsis> <type>string</type><methodname>mysqli_error</methodname> - <methodparam><type>resource</type><parameter>link</parameter></methodparam> + <methodparam><type>object</type><parameter>link</parameter></methodparam> </methodsynopsis> + <para>Object oriented style (property)</para> + <classsynopsis> + <ooclass><classname>mysqli</classname></ooclass> + <fieldsynopsis><type>string</type><varname>error</varname></fieldsynopsis> + </classsynopsis> <para> The <function>mysqli_error</function> function is identical to the corresponding <function>mysqli_errno</function> function in every way, except instead of returning an integer error code the <function>mysqli_error</function> function will return a string representation of the last error to occur for the database connection - represented by the <parameter>link</parameter> parameter. If no error has occurred, + represented by the <parameter>link</parameter> parameter. If no error has occured, this function will return an empty string. </para> + </refsect1> + <refsect1> + <title>Return values</title> + <para> + A string that describes the error. An empty string if no error occurred. + </para> + </refsect1> + <refsect1> + <title>Example</title> <para> <example> <title>Using the mysqli_error function</title> @@ -36,8 +51,11 @@ </programlisting> </example> </para> + </refsect1> + <refsect1> + <title>See also</title> <para> - See also <function>mysqli_errno</function>. + <function>mysqli_errno</function>, <function>mysqli_sqlstate</function>. </para> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc/en/reference/mysqli/functions/mysqli-execute.xml?r1=1.7&r2=1.8&ty=u Index: phpdoc/en/reference/mysqli/functions/mysqli-execute.xml diff -u phpdoc/en/reference/mysqli/functions/mysqli-execute.xml:1.7 phpdoc/en/reference/mysqli/functions/mysqli-execute.xml:1.8 --- phpdoc/en/reference/mysqli/functions/mysqli-execute.xml:1.7 Thu Dec 18 09:14:31 2003 +++ phpdoc/en/reference/mysqli/functions/mysqli-execute.xml Wed Jan 28 18:18:42 2004 @@ -1,21 +1,32 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.7 $ --> +<!-- $Revision: 1.8 $ --> <refentry id="function.mysqli-execute"> <refnamediv> <refname>mysqli_execute</refname> + <refname>stmt->execute</refname> <refpurpose>Executes a prepared Query</refpurpose> </refnamediv> <refsect1> <title>Description</title> + <para>Procedural style:</para> <methodsynopsis> - <type>int</type><methodname>mysqli_execute</methodname> - <methodparam><type>resource</type><parameter>stmt</parameter></methodparam> + <type>bool</type><methodname>mysqli_execute</methodname> + <methodparam><type>object</type><parameter>stmt</parameter></methodparam> </methodsynopsis> + <para>Object oriented style (method):</para> + <classsynopsis> + <ooclass><classname>mysql</classname></ooclass> + <methodsynopsis> + <type>bool</type> + <methodname>execute</methodname> + <methodparam><type>void</type><parameter></parameter></methodparam> + </methodsynopsis> + </classsynopsis> <para> The <function>mysqli_execute</function> function executes a query that has been previously prepared using the <function>mysqli_prepare</function> function represented by the - <parameter>stmt</parameter> resource. When executed any parameter markers which exist will - automatically be replaced with the appropriate data. + <parameter>stmt</parameter> object. When executed any parameter markers which exist will + automatically be replaced with the appropiate data. </para> <para> If the statement is UPDATE, DELETE, or INSERT, the total number of affected rows can be @@ -28,6 +39,13 @@ function must be used to fetch the data prior to preforming any additional queries. </para> </note> + </refsect1> + <refsect1> + <title>Return values</title> + <para>&return.success;</para> + </refsect1> + <refsect1> + <title>Example</title> <para> <example> <title>Using the mysqli_execute function</title> @@ -68,9 +86,11 @@ </programlisting> </example> </para> + </refsect1> + <refsect1> + <title>See also</title> <para> - See also - <function>mysqli_prepare</function> and + <function>mysqli_prepare</function> <function>mysqli_bind_param</function>. </para> </refsect1> http://cvs.php.net/diff.php/phpdoc/en/reference/mysqli/functions/mysqli-fetch-array.xml?r1=1.8&r2=1.9&ty=u Index: phpdoc/en/reference/mysqli/functions/mysqli-fetch-array.xml diff -u phpdoc/en/reference/mysqli/functions/mysqli-fetch-array.xml:1.8 phpdoc/en/reference/mysqli/functions/mysqli-fetch-array.xml:1.9 --- phpdoc/en/reference/mysqli/functions/mysqli-fetch-array.xml:1.8 Mon Dec 15 11:52:08 2003 +++ phpdoc/en/reference/mysqli/functions/mysqli-fetch-array.xml Wed Jan 28 18:18:42 2004 @@ -1,17 +1,28 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.8 $ --> +<!-- $Revision: 1.9 $ --> <refentry id="function.mysqli-fetch-array"> <refnamediv> <refname>mysqli_fetch_array</refname> + <refname>result->fetch_array</refname> <refpurpose>Fetch a result row as an associative, a numeric array, or both.</refpurpose> </refnamediv> <refsect1> <title>Description</title> + <para>Procedural style:</para> <methodsynopsis> - <type>array</type><methodname>mysqli_fetch_array</methodname> - <methodparam><type>resource</type><parameter>result</parameter></methodparam> + <type>mixed</type><methodname>mysqli_fetch_array</methodname> + <methodparam><type>object</type><parameter>result</parameter></methodparam> <methodparam choice='opt'><type>int</type><parameter>resulttype</parameter></methodparam> </methodsynopsis> + <para>Object oriend style (method):</para> + <classsynopsis> + <ooclass><classname>result</classname></ooclass> + <methodsynopsis> + <type>mixed</type> + <methodname>fetch_array</methodname> + <methodparam choice='opt'><type>int</type><parameter>resulttype</parameter></methodparam> + </methodsynopsis> + </classsynopsis> <para> Returns an array that corresponds to the fetched row or &false; if there are no more rows for the database connection represented by the <parameter>link</parameter> parameter. @@ -40,6 +51,15 @@ <function>mysqli_fetch_row</function> function. The final option MYSQLI_BOTH will create a single array with the attributes of both. </para> + </refsect1> + <refsect1> + <title>Return values</title> + <para> + Returns an array that corresponds to the fetched row or &false; if there are no more rows in resultset. + </para> + </refsect1> + <refsect1> + <title>Example</title> <para> <example> <title>mysqli_fetch_array with MYSQLI_NUM</title> @@ -53,7 +73,7 @@ $result = mysqli_query("SELECT id, name FROM mytable"); while ($row = mysqli_fetch_array($result, MYSQLI_NUM)) { - printf("ID: %s Name: %s", $row[0], $row[1]); + printf ("ID: %s Name: %s", $row[0], $row[1]); } mysqli_free_result($result); @@ -102,9 +122,12 @@ </programlisting> </example> </para> + </refsect1> + <refsect1> + <title>See also</title> <para> - See also <function>mysqli_fetch_assoc</function>, - <function>mysqli_fetch_row</function> and + <function>mysqli_fetch_assoc</function>, + <function>mysqli_fetch_row</function>, <function>mysqli_fetch_object</function>. </para> </refsect1> http://cvs.php.net/diff.php/phpdoc/en/reference/mysqli/functions/mysqli-fetch-assoc.xml?r1=1.6&r2=1.7&ty=u Index: phpdoc/en/reference/mysqli/functions/mysqli-fetch-assoc.xml diff -u phpdoc/en/reference/mysqli/functions/mysqli-fetch-assoc.xml:1.6 phpdoc/en/reference/mysqli/functions/mysqli-fetch-assoc.xml:1.7 --- phpdoc/en/reference/mysqli/functions/mysqli-fetch-assoc.xml:1.6 Thu Dec 18 09:14:31 2003 +++ phpdoc/en/reference/mysqli/functions/mysqli-fetch-assoc.xml Wed Jan 28 18:18:42 2004 @@ -1,16 +1,27 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.6 $ --> +<!-- $Revision: 1.7 $ --> <refentry id="function.mysqli-fetch-assoc"> <refnamediv> <refname>mysqli_fetch_assoc</refname> + <refname>mysqli->fetch_assoc</refname> <refpurpose>Fetch a result row as an associative array</refpurpose> </refnamediv> <refsect1> <title>Description</title> + <para>Procedural style:</para> <methodsynopsis> <type>array</type><methodname>mysqli_fetch_assoc</methodname> - <methodparam><type>resource</type><parameter>result</parameter></methodparam> + <methodparam><type>object</type><parameter>result</parameter></methodparam> </methodsynopsis> + <para>Object oriend style (method):</para> + <classsynopsis> + <ooclass><classname>result</classname></ooclass> + <methodsynopsis> + <type>array</type> + <methodname>fetch_assoc</methodname> + <methodparam><type>void</type><parameter></parameter></methodparam> + </methodsynopsis> + </classsynopsis> <para> Returns an associative array that corresponds to the fetched row or &false; if there are no more rows. @@ -24,11 +35,20 @@ <para> If two or more columns in the result set have the same column name, the associative array returned by the <function>mysqli_fetch_assoc</function> function will contain the value of - the last column of that name. If you must work with result sets with this property, the + the last column of that name. If you must work with result sets with this properity, the <function>mysqli_fetch_row</function> should be used which returns an numerically-indexed array instead. </para> &database.field-case; + </refsect1> + <refsect1> + <title>Return values</title> + <para> + Returns an array that corresponds to the fetched row or &false; if there are no more rows in resultset. + </para> + </refsect1> + <refsect1> + <title>Example</title> <example> <title>An expanded <function>mysqli_fetch_assoc</function> example</title> <programlisting role="php"> @@ -79,9 +99,12 @@ ]]> </programlisting> </example> + </refsect1> + <refsect1> + <title>See also</title> <para> - See also <function>mysqli_fetch_array</function>, - <function>mysqli_fetch_row</function> and + <function>mysqli_fetch_array</function>, + <function>mysqli_fetch_row</function>, <function>mysqli_fetch_object</function>. </para> </refsect1> http://cvs.php.net/diff.php/phpdoc/en/reference/mysqli/functions/mysqli-fetch-field-direct.xml?r1=1.2&r2=1.3&ty=u Index: phpdoc/en/reference/mysqli/functions/mysqli-fetch-field-direct.xml diff -u phpdoc/en/reference/mysqli/functions/mysqli-fetch-field-direct.xml:1.2 phpdoc/en/reference/mysqli/functions/mysqli-fetch-field-direct.xml:1.3 --- phpdoc/en/reference/mysqli/functions/mysqli-fetch-field-direct.xml:1.2 Sat May 24 02:44:21 2003 +++ phpdoc/en/reference/mysqli/functions/mysqli-fetch-field-direct.xml Wed Jan 28 18:18:42 2004 @@ -1,22 +1,50 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.2 $ --> +<!-- $Revision: 1.3 $ --> <refentry id="function.mysqli-fetch-field-direct"> <refnamediv> <refname>mysqli_fetch_field_direct</refname> + <refname>result->fetch_field_direct</refname> <refpurpose> Fetch meta-data for a single field </refpurpose> </refnamediv> <refsect1> <title>Description</title> + <para>Procedural style:</para> <methodsynopsis> - <type>int</type><methodname>mysqli_fetch_field_direct</methodname> - <methodparam><type>resource</type><parameter>result</parameter></methodparam> - <methodparam><type>int</type><parameter>offset</parameter></methodparam> + <type>mixed</type><methodname>mysqli_fetch_field_direct</methodname> + <methodparam><type>object</type><parameter>result</parameter></methodparam> + <methodparam><type>int</type><parameter>fieldnr</parameter></methodparam> </methodsynopsis> - - &warn.undocumented.func; - + <para>Object oriented style (method):</para> + <classsynopsis> + <ooclass><classname>result</classname></ooclass> + <methodsynopsis> + <type>mixed</type> + <methodname>fetch_field_direct</methodname> + <methodparam><type>int</type><parameter>fieldnr</parameter></methodparam> + </methodsynopsis> + </classsynopsis> + <para> + <function>mysqli_fetch_field_direct</function> returns an associative array which contains + field definition informations from specified resultset. The value of fieldnr must be in the + range from <literal>0</literal> to <literal>number of fields - 1</literal>. + </para> + </refsect1> + <refsect1> + <title>Return values</title> + <para> + Returns an associative array which contains field definition informations or &false; if no field information + for specified <literal>fieldnr</literal> is available. + </para> + </refsect1> + <refsect1> + <title>See also</title> + <para> + <function>mysqli_num_fields</function> + <function>mysqli_fetch_field</function> + <function>mysqli_fetch_fields</function> + </para> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc/en/reference/mysqli/functions/mysqli-fetch-field.xml?r1=1.5&r2=1.6&ty=u Index: phpdoc/en/reference/mysqli/functions/mysqli-fetch-field.xml diff -u phpdoc/en/reference/mysqli/functions/mysqli-fetch-field.xml:1.5 phpdoc/en/reference/mysqli/functions/mysqli-fetch-field.xml:1.6 --- phpdoc/en/reference/mysqli/functions/mysqli-fetch-field.xml:1.5 Wed Jun 11 09:45:28 2003 +++ phpdoc/en/reference/mysqli/functions/mysqli-fetch-field.xml Wed Jan 28 18:18:42 2004 @@ -1,16 +1,27 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.5 $ --> +<!-- $Revision: 1.6 $ --> <refentry id="function.mysqli-fetch-field"> <refnamediv> <refname>mysqli_fetch_field</refname> + <refname>result->fetch_field</refname> <refpurpose>Returns the next field in the result set</refpurpose> </refnamediv> <refsect1> <title>Description</title> + <para>Procedural style:</para> + <methodsynopsis> + <type>mixed</type><methodname>mysqli_fetch_field</methodname> + <methodparam><type>object</type><parameter>result</parameter></methodparam> + </methodsynopsis> + <para>Object oriented style (method):</para> + <classsynopsis> + <ooclass><classname>result</classname></ooclass> <methodsynopsis> - <type>object</type><methodname>mysqli_fetch_field</methodname> - <methodparam><type>resource</type><parameter>result</parameter></methodparam> + <type>mixed</type> + <methodname>fetch_field</methodname> + <methodparam><type>void</type><parameter></parameter></methodparam> </methodsynopsis> + </classsynopsis> <para> The <function>mysqli_fetch_field</function> function is used to return the attributes of the next column in the result set represented by the <parameter>result</parameter> @@ -35,7 +46,7 @@ </row> <row> <entry>orgname</entry> - <entry>?</entry> + <entry>Original column name if an alias was specified</entry> </row> <row> <entry>table</entry> @@ -43,7 +54,7 @@ </row> <row> <entry>orgtable</entry> - <entry>?</entry> + <entry>Original table name if an alias was specified</entry> </row> <row> <entry>def</entry> @@ -70,6 +81,21 @@ </table> </para> </refsect1> + <refsect1> + <title>Return values</title> + <para> + Returns an object which contains field definition informations or &false; if no field information + is available. + </para> + </refsect1> + <refsect1> + <title>See also</title> + <para> + <function>mysqli_num_fields</function> + <function>mysqli_fetch_field_direct</function> + <function>mysqli_fetch_fields</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-fetch-fields.xml?r1=1.5&r2=1.6&ty=u Index: phpdoc/en/reference/mysqli/functions/mysqli-fetch-fields.xml diff -u phpdoc/en/reference/mysqli/functions/mysqli-fetch-fields.xml:1.5 phpdoc/en/reference/mysqli/functions/mysqli-fetch-fields.xml:1.6 --- phpdoc/en/reference/mysqli/functions/mysqli-fetch-fields.xml:1.5 Wed Jun 11 09:45:28 2003 +++ phpdoc/en/reference/mysqli/functions/mysqli-fetch-fields.xml Wed Jan 28 18:18:42 2004 @@ -1,16 +1,27 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.5 $ --> +<!-- $Revision: 1.6 $ --> <refentry id="function.mysqli-fetch-fields"> <refnamediv> <refname>mysqli_fetch_fields</refname> + <refname>result->fetch_fields</refname> <refpurpose>Returns an array of objects representing the fields in a result set</refpurpose> </refnamediv> <refsect1> <title>Description</title> + <para>Procedural Style:</para> <methodsynopsis> - <type>array</type><methodname>mysqli_fetch_fields</methodname> - <methodparam><type>resource</type><parameter>result</parameter></methodparam> + <type>mixed</type><methodname>mysqli_fetch_fields</methodname> + <methodparam><type>object</type><parameter>result</parameter></methodparam> </methodsynopsis> + <para>Object oriented style (method):</para> + <classsynopsis> + <ooclass><classname>result</classname></ooclass> + <methodsynopsis> + <type>mixed</type> + <methodname>fetch_fields</methodname> + <methodparam><type>int</type><parameter>fieldnr</parameter></methodparam> + </methodsynopsis> + </classsynopsis> <para> This function serves an identical purpose to the <function>mysqli_fetch_field</function> function with the single difference that, instead of returning one object at a time for @@ -19,6 +30,21 @@ function. </para> </refsect1> + <refsect1> + <title>Return values</title> + <para> + Returns an array of objects which contains field definition informations or &false; if no field information + is available. + </para> + </refsect1> + <refsect1> + <title>See also</title> + <para> + <function>mysqli_num_fields</function> + <function>mysqli_fetch_field</function> + <function>mysqli_fetch_field_direct</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-fetch-lengths.xml?r1=1.4&r2=1.5&ty=u Index: phpdoc/en/reference/mysqli/functions/mysqli-fetch-lengths.xml diff -u phpdoc/en/reference/mysqli/functions/mysqli-fetch-lengths.xml:1.4 phpdoc/en/reference/mysqli/functions/mysqli-fetch-lengths.xml:1.5 --- phpdoc/en/reference/mysqli/functions/mysqli-fetch-lengths.xml:1.4 Tue Sep 30 04:33:39 2003 +++ phpdoc/en/reference/mysqli/functions/mysqli-fetch-lengths.xml Wed Jan 28 18:18:42 2004 @@ -1,16 +1,23 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.4 $ --> +<!-- $Revision: 1.5 $ --> <refentry id="function.mysqli-fetch-lengths"> <refnamediv> <refname>mysqli_fetch_lengths</refname> + <refname>result->fetch_lengths</refname> <refpurpose>Returns the lengths of the columns of the current row in the result set</refpurpose> </refnamediv> <refsect1> <title>Description</title> - <methodsynopsis> - <type>array</type><methodname>mysqli_fetch_lengths</methodname> - <methodparam><type>resource</type><parameter>result</parameter></methodparam> - </methodsynopsis> + <para>Procedural style:</para> + <methodsynopsis> + <type>mixed</type><methodname>mysqli_fetch_lengths</methodname> + <methodparam><type>object</type><parameter>result</parameter></methodparam> + </methodsynopsis> + <para>Object oriented style (property):</para> + <classsynopsis> + <ooclass><classname>result</classname></ooclass> + <fieldsynopsis><type>mixed</type><varname>fetch_lengths</varname></fieldsynopsis> + </classsynopsis> <para> The <function>mysqli_fetch_lengths</function> function returns an array containing the lengths of every column of the current row within the result set represented by the @@ -18,6 +25,18 @@ representing the lengths of each column is returned or &false; on failure. </para> </refsect1> + <refsect1> + <title>Return values</title> + <para> + An array of integers representing the size of each column + (not including any terminating null characters). &false if an error occurred. + </para> + <para> + <function>mysql_fetch_lengths</function> is valid only for the current row of the result set. + It returns &false; if you call it before calling mysql_fetch_row/array/object or after retrieving + all rows in the result. + </para> + </refsect1> </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/diff.php/phpdoc/en/reference/mysqli/functions/mysqli-fetch-object.xml?r1=1.6&r2=1.7&ty=u Index: phpdoc/en/reference/mysqli/functions/mysqli-fetch-object.xml diff -u phpdoc/en/reference/mysqli/functions/mysqli-fetch-object.xml:1.6 phpdoc/en/reference/mysqli/functions/mysqli-fetch-object.xml:1.7 --- phpdoc/en/reference/mysqli/functions/mysqli-fetch-object.xml:1.6 Thu Jul 3 04:26:08 2003 +++ phpdoc/en/reference/mysqli/functions/mysqli-fetch-object.xml Wed Jan 28 18:18:42 2004 @@ -1,25 +1,45 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.6 $ --> +<!-- $Revision: 1.7 $ --> <refentry id="function.mysqli-fetch-object"> <refnamediv> <refname>mysqli_fetch_object</refname> + <refname>result->fetch_object</refname> <refpurpose>Returns the current row of a result set as an object</refpurpose> </refnamediv> <refsect1> <title>Description</title> + <para>Procedural style:</para> + <methodsynopsis> + <type>mixed</type><methodname>mysqli_fetch_object</methodname> + <methodparam><type>object</type><parameter>result</parameter></methodparam> + </methodsynopsis> + <para>Object oriented style (method):</para> + <classsynopsis> + <ooclass><classname>result</classname></ooclass> <methodsynopsis> - <type>object</type><methodname>mysqli_fetch_object</methodname> - <methodparam><type>resource</type><parameter>result</parameter></methodparam> + <type>mixed</type> + <methodname>fetch_object</methodname> + <methodparam><type>void</type><parameter></parameter></methodparam> </methodsynopsis> + </classsynopsis> <para> The <function>mysqli_fetch_object</function> will return the current row result set as an object where the attributes of the object represent the names of the fields found within the result set. If no more rows exist in the current result set, &false; is returned. </para> + </refsect1> + <refsect1> + <title>Return values</title> + <para> + Returns an object or &false; if an error occured. + </para> &database.field-case; + </refsect1> + <refsect1> + <title>See also</title> <para> - See also <function>mysqli_fetch_array</function>, - <function>mysqli_fetch_assoc</function> and + <function>mysqli_fetch_array</function>, + <function>mysqli_fetch_assoc</function>, <function>mysqli_fetch_row</function>. </para> </refsect1> http://cvs.php.net/diff.php/phpdoc/en/reference/mysqli/functions/mysqli-fetch-row.xml?r1=1.4&r2=1.5&ty=u Index: phpdoc/en/reference/mysqli/functions/mysqli-fetch-row.xml diff -u phpdoc/en/reference/mysqli/functions/mysqli-fetch-row.xml:1.4 phpdoc/en/reference/mysqli/functions/mysqli-fetch-row.xml:1.5 --- phpdoc/en/reference/mysqli/functions/mysqli-fetch-row.xml:1.4 Thu Jul 3 04:26:08 2003 +++ phpdoc/en/reference/mysqli/functions/mysqli-fetch-row.xml Wed Jan 28 18:18:42 2004 @@ -1,16 +1,27 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.4 $ --> +<!-- $Revision: 1.5 $ --> <refentry id="function.mysqli-fetch-row"> <refnamediv> <refname>mysqli_fetch_row</refname> + <refname>result->fetch_row</refname> <refpurpose>Get a result row as an enumerated array</refpurpose> </refnamediv> <refsect1> <title>Description</title> + <para>Procedural style:</para> + <methodsynopsis> + <type>mixed</type><methodname>mysqli_fetch_row</methodname> + <methodparam><type>object</type><parameter>result</parameter></methodparam> + </methodsynopsis> + <para>Object oriented style (method):</para> + <classsynopsis> + <ooclass><classname>result</classname></ooclass> <methodsynopsis> - <type>array</type><methodname>mysqli_fetch_row</methodname> - <methodparam><type>resource</type><parameter>result</parameter></methodparam> + <type>mixed</type> + <methodname>fetch_row</methodname> + <methodparam><type>void</type><parameter></parameter></methodparam> </methodsynopsis> + </classsynopsis> <para> Returns an array that corresponds to the fetched row, or &false; if there are no more rows. </para> @@ -21,9 +32,19 @@ <function>mysqli_fetch_row</function> function will return the next row within the result set, or &false; if there are no more rows. </para> + </refsect1> + <refsect1> + <title>Return values</title> + <para> + <function>mysqli_fetch_row</function> returns an array that corresponds to the fetched row + or &false if there are no more rows in result set. + </para> + </refsect1> + <refsect1> + <title>See also</title> <para> - See also <function>mysqli_fetch_array</function>, - <function>mysqli_fetch_assoc</function> and + <function>mysqli_fetch_array</function>, + <function>mysqli_fetch_assoc</function>, <function>mysqli_fetch_object</function>. </para> </refsect1> http://cvs.php.net/diff.php/phpdoc/en/reference/mysqli/functions/mysqli-fetch.xml?r1=1.2&r2=1.3&ty=u Index: phpdoc/en/reference/mysqli/functions/mysqli-fetch.xml diff -u phpdoc/en/reference/mysqli/functions/mysqli-fetch.xml:1.2 phpdoc/en/reference/mysqli/functions/mysqli-fetch.xml:1.3 --- phpdoc/en/reference/mysqli/functions/mysqli-fetch.xml:1.2 Sat May 24 02:44:21 2003 +++ phpdoc/en/reference/mysqli/functions/mysqli-fetch.xml Wed Jan 28 18:18:42 2004 @@ -1,21 +1,74 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.2 $ --> +<!-- $Revision: 1.3 $ --> <refentry id="function.mysqli-fetch"> <refnamediv> <refname>mysqli_fetch</refname> + <refname>stmt->fetch</refname> <refpurpose> Fetch results from a prepared statement into the bound variables </refpurpose> </refnamediv> <refsect1> <title>Description</title> + <para>Procedural style:</para> + <methodsynopsis> + <type>mixed</type><methodname>mysqli_fetch</methodname> + <methodparam><type>object</type><parameter>stmt</parameter></methodparam> + </methodsynopsis> + <para>Object oriented style (method):</para> + <classsynopsis> + <ooclass><classname>stmt</classname></ooclass> <methodsynopsis> - <type>int</type><methodname>mysqli_fetch</methodname> - <methodparam><type>resource</type><parameter>stmt</parameter></methodparam> + <type>mixed</type> + <methodname>fetch</methodname> + <methodparam><type>void</type><parameter></parameter></methodparam> </methodsynopsis> - - &warn.undocumented.func; - + </classsynopsis> + <para> + <function>mysqli_fetch</function> returns row data using the variables bound by <function>mysqli_bind_result</function>. + </para> + <note> + <para> + Note that all columns must be bound by the application before calling <function>mysqli_fetch</function>. + </para> + </note> + </refsect1> + <refsect1> + <title>Return values</title> + <table> + <title>Return values</title> + <tgroup cols='2'> + <thead> + <row> + <entry>Value</entry> + <entry>Description</entry> + </row> + </thead> + <tbody> + <row> + <entry>&true;</entry> + <entry>Success. Data has been fetched</entry> + </row> + <row> + <entry>&false;</entry> + <entry>Error occured</entry> + </row> + <row> + <entry><literal>MYSQLI_NO_DATA</literal></entry> + <entry>No more rows/data exists</entry> + </row> + </tbody> + </tgroup> + </table> + </refsect1> + <refsect1> + <title>See also</title> + <para> + <function>mysqli_prepare</function>, + <function>mysqli_stmt_errno</function>, + <function>mysqli_stmt_error</function>, + <function>mysqli_bind_result</function> + </para> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc/en/reference/mysqli/functions/mysqli-field-count.xml?r1=1.4&r2=1.5&ty=u Index: phpdoc/en/reference/mysqli/functions/mysqli-field-count.xml diff -u phpdoc/en/reference/mysqli/functions/mysqli-field-count.xml:1.4 phpdoc/en/reference/mysqli/functions/mysqli-field-count.xml:1.5 --- phpdoc/en/reference/mysqli/functions/mysqli-field-count.xml:1.4 Sun May 25 15:09:28 2003 +++ phpdoc/en/reference/mysqli/functions/mysqli-field-count.xml Wed Jan 28 18:18:42 2004 @@ -1,16 +1,27 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.4 $ --> +<!-- $Revision: 1.5 $ --> <refentry id="function.mysqli-field-count"> <refnamediv> <refname>mysqli_field_count</refname> + <refname>mysql->field_cont</refname> <refpurpose>Returns the number of columns for the most recent query</refpurpose> </refnamediv> <refsect1> <title>Description</title> + <para>Procedural style:</para> + <methodsynopsis> + <type>int</type><methodname>mysqli_field_count</methodname> + <methodparam><type>object</type><parameter>link</parameter></methodparam> + </methodsynopsis> + <para>Object oriented style (method):</para> + <classsynopsis> + <ooclass><classname>mysql</classname></ooclass> <methodsynopsis> - <type>int</type><methodname>mysqli_field_count</methodname> - <methodparam><type>resource</type><parameter>link</parameter></methodparam> + <type>int</type> + <methodname>field_count</methodname> + <methodparam><type>void</type><parameter></parameter></methodparam> </methodsynopsis> + </classsynopsis> <para> Returns the number of columns for the most recent query on the connection represented by the <parameter>link</parameter> parameter. This function @@ -19,6 +30,10 @@ set or not without knowing the nature of the query. </para> </refsect1> + <refsect1> + <title>Return values</title> + <para>An integer representing the number of fields in a result set</para> + </refsect1> </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/diff.php/phpdoc/en/reference/mysqli/functions/mysqli-field-seek.xml?r1=1.2&r2=1.3&ty=u Index: phpdoc/en/reference/mysqli/functions/mysqli-field-seek.xml diff -u phpdoc/en/reference/mysqli/functions/mysqli-field-seek.xml:1.2 phpdoc/en/reference/mysqli/functions/mysqli-field-seek.xml:1.3 --- phpdoc/en/reference/mysqli/functions/mysqli-field-seek.xml:1.2 Sat May 24 02:44:21 2003 +++ phpdoc/en/reference/mysqli/functions/mysqli-field-seek.xml Wed Jan 28 18:18:42 2004 @@ -1,22 +1,43 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.2 $ --> +<!-- $Revision: 1.3 $ --> <refentry id="function.mysqli-field-seek"> <refnamediv> <refname>mysqli_field_seek</refname> + <refname>result->field_seek</refname> <refpurpose> Set result pointer to a specified field offset </refpurpose> </refnamediv> <refsect1> <title>Description</title> + <para>Procedural style:</para> <methodsynopsis> <type>int</type><methodname>mysqli_field_seek</methodname> - <methodparam><type>resource</type><parameter>link</parameter></methodparam> + <methodparam><type>object</type><parameter>result</parameter></methodparam> <methodparam><type>int</type><parameter>fieldnr</parameter></methodparam> </methodsynopsis> - - &warn.undocumented.func; - + <para>Object oriented style (method):</para> + <classsynopsis> + <ooclass><classname>result</classname></ooclass> + <methodsynopsis> + <type>int</type> + <methodname>field_seek</methodname> + <methodparam><type>int</type><parameter>fieldnr</parameter></methodparam> + </methodsynopsis> + </classsynopsis> + <para> + Sets the field cursor to the given offset. The next call to <function>mysqli_fetch_field</function> + will retrieve the field definition of the column associated with that offset. + </para> + <note> + <para>To seek to the beginning of a row, pass an offset value of zero.</para> + </note> + </refsect1> + <refsect1> + <title>Return values</title> + <para> + <function>mysqli_field_seek</function> returns previuos value of field cursor. + </para> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc/en/reference/mysqli/functions/mysqli-field-tell.xml?r1=1.2&r2=1.3&ty=u Index: phpdoc/en/reference/mysqli/functions/mysqli-field-tell.xml diff -u phpdoc/en/reference/mysqli/functions/mysqli-field-tell.xml:1.2 phpdoc/en/reference/mysqli/functions/mysqli-field-tell.xml:1.3 --- phpdoc/en/reference/mysqli/functions/mysqli-field-tell.xml:1.2 Sat May 24 02:44:21 2003 +++ phpdoc/en/reference/mysqli/functions/mysqli-field-tell.xml Wed Jan 28 18:18:42 2004 @@ -1,21 +1,46 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.2 $ --> +<!-- $Revision: 1.3 $ --> <refentry id="function.mysqli-field-tell"> <refnamediv> <refname>mysqli_field_tell</refname> + <refname>result->current_field</refname> <refpurpose> Get current field offset of a result pointer </refpurpose> </refnamediv> <refsect1> <title>Description</title> + <para>Procedural style:</para> <methodsynopsis> <type>int</type><methodname>mysqli_field_tell</methodname> - <methodparam><type>resource</type><parameter>result</parameter></methodparam> + <methodparam><type>object</type><parameter>result</parameter></methodparam> </methodsynopsis> - - &warn.undocumented.func; - + <para>Object oriented style (property):</para> + <classsynopsis> + <ooclass><classname>result</classname></ooclass> + <fieldsynopsis> + <type>int</type> + <varname>current_field</varname> + </fieldsynopsis> + </classsynopsis> + <para> + Returns the position of the field cursor used for the last + <function>mysqli_fetch_field</function> call. This value can + be used as an argument to <function>mysqli_field_seek</function>. + </para> + </refsect1> + <refsect1> + &reftitle.returnvalues; + <para> + Returns current offset of field cursor. + </para> + </refsect1> + <refsect1> + &reftitle.seealso; + <para> + <function>mysqli_fetch_field</function>, + <function>mysqli_field_seek</function> + </para> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc/en/reference/mysqli/functions/mysqli-free-result.xml?r1=1.3&r2=1.4&ty=u Index: phpdoc/en/reference/mysqli/functions/mysqli-free-result.xml diff -u phpdoc/en/reference/mysqli/functions/mysqli-free-result.xml:1.3 phpdoc/en/reference/mysqli/functions/mysqli-free-result.xml:1.4 --- phpdoc/en/reference/mysqli/functions/mysqli-free-result.xml:1.3 Fri May 23 14:07:23 2003 +++ phpdoc/en/reference/mysqli/functions/mysqli-free-result.xml Wed Jan 28 18:18:42 2004 @@ -1,22 +1,57 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.3 $ --> +<!-- $Revision: 1.4 $ --> <refentry id="function.mysqli-free-result"> <refnamediv> <refname>mysqli_free_result</refname> + <refname>result->free</refname> <refpurpose>Frees the memory associated with a result</refpurpose> </refnamediv> <refsect1> <title>Description</title> + <para>Procedural style:</para> + <methodsynopsis> + <type>void</type><methodname>mysqli_free_result</methodname> + <methodparam><type>object</type><parameter>result</parameter></methodparam> + </methodsynopsis> + <para>Object oriented style (method):</para> + <classsynopsis> + <ooclass><classname>result</classname></ooclass> <methodsynopsis> - <type>int</type><methodname>mysqli_free_result</methodname> - <methodparam><type>resource</type><parameter>result</parameter></methodparam> + <type>void</type> + <methodname>free</methodname> + <methodparam><type>void</type><parameter></parameter></methodparam> </methodsynopsis> + </classsynopsis> <para> The <function>mysqli_free_result</function> function frees the memory associated with the result represented by the - <parameter>result</parameter> parameter. + <parameter>result</parameter> parameter, which was allocated by + <function>mysqli_query</function>, <function>mysqli_store_result</function> + or <function>mysqli_use_result</function>. + </para> + <note> + <para> + You should always free your result with <function>mysqli_free_result</function>, + when your result object is not needed anymore. + </para> + </note> + </refsect1> + <refsect1> + &reftitle.returnvalues; + <para> + This function doesn't return any value. + </para> + </refsect1> + <refsect1> + &reftitle.seealso; + <para> + <function>mysqli_query</function>, + <function>mysqli_stmt_store_result</function>, + <function>mysqli_store_result</function>, + <function>mysqli_use_result</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-get-client-info.xml?r1=1.3&r2=1.4&ty=u Index: phpdoc/en/reference/mysqli/functions/mysqli-get-client-info.xml diff -u phpdoc/en/reference/mysqli/functions/mysqli-get-client-info.xml:1.3 phpdoc/en/reference/mysqli/functions/mysqli-get-client-info.xml:1.4 --- phpdoc/en/reference/mysqli/functions/mysqli-get-client-info.xml:1.3 Fri May 23 14:07:23 2003 +++ phpdoc/en/reference/mysqli/functions/mysqli-get-client-info.xml Wed Jan 28 18:18:42 2004 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.3 $ --> +<!-- $Revision: 1.4 $ --> <refentry id="function.mysqli-get-client-info"> <refnamediv> <refname>mysqli_get_client_info</refname> @@ -17,6 +17,18 @@ MySQLi extension. </para> </refsect1> + <refsect1> + &reftitle.returnvalues; + <para> + A string that represents the MySQL client library version + </para> + </refsect1> + <refsect1> + &reftitle.seealso; + <para> + <function>mysqli_get_client_version</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-get-host-info.xml?r1=1.3&r2=1.4&ty=u Index: phpdoc/en/reference/mysqli/functions/mysqli-get-host-info.xml diff -u phpdoc/en/reference/mysqli/functions/mysqli-get-host-info.xml:1.3 phpdoc/en/reference/mysqli/functions/mysqli-get-host-info.xml:1.4 --- phpdoc/en/reference/mysqli/functions/mysqli-get-host-info.xml:1.3 Fri May 23 14:07:23 2003 +++ phpdoc/en/reference/mysqli/functions/mysqli-get-host-info.xml Wed Jan 28 18:18:42 2004 @@ -1,22 +1,41 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.3 $ --> +<!-- $Revision: 1.4 $ --> <refentry id="function.mysqli-get-host-info"> <refnamediv> <refname>mysqli_get_host_info</refname> + <refname>mysqli->get_host_info</refname> <refpurpose>Returns a string representing the type of connection used</refpurpose> </refnamediv> <refsect1> <title>Description</title> - <methodsynopsis> - <type>string</type><methodname>mysqli_get_host_info</methodname> - <methodparam><type>resource</type><parameter>link</parameter></methodparam> - </methodsynopsis> + <para>Procdural style:</para> + <methodsynopsis> + <type>string</type><methodname>mysqli_get_host_info</methodname> + <methodparam><type>object</type><parameter>link</parameter></methodparam> + </methodsynopsis> + <para>Object oriented style (property):</para> + <classsynopsis> + <ooclass><classname>mysqli</classname></ooclass> + <fieldsynopsis><type>string</type><varname>host_info</varname></fieldsynopsis> + </classsynopsis> <para> The <function>mysqli_get_host_info</function> function returns a string describing the connection represented by the <parameter>link</parameter> parameter is using (including the server host name). </para> </refsect1> + <refsect1> + &reftitle.returnvalues; + <para> + A character string representing the server hostname and the connection type. + </para> + </refsect1> + <refsect1> + &reftitle.seealso; + <para> + <function>mysqli_get_proto_info</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-get-proto-info.xml?r1=1.3&r2=1.4&ty=u Index: phpdoc/en/reference/mysqli/functions/mysqli-get-proto-info.xml diff -u phpdoc/en/reference/mysqli/functions/mysqli-get-proto-info.xml:1.3 phpdoc/en/reference/mysqli/functions/mysqli-get-proto-info.xml:1.4 --- phpdoc/en/reference/mysqli/functions/mysqli-get-proto-info.xml:1.3 Fri May 23 14:07:23 2003 +++ phpdoc/en/reference/mysqli/functions/mysqli-get-proto-info.xml Wed Jan 28 18:18:42 2004 @@ -1,21 +1,40 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.3 $ --> +<!-- $Revision: 1.4 $ --> <refentry id="function.mysqli-get-proto-info"> <refnamediv> <refname>mysqli_get_proto_info</refname> + <refname>mysqli->protocol_version</refname> <refpurpose>Returns the version of the MySQL protocol used</refpurpose> </refnamediv> <refsect1> <title>Description</title> - <methodsynopsis> - <type>int</type><methodname>mysqli_get_proto_info</methodname> - <methodparam><type>resource</type><parameter>link</parameter></methodparam> - </methodsynopsis> + <para>Procedural style:</para> + <methodsynopsis> + <type>int</type><methodname>mysqli_get_proto_info</methodname> + <methodparam><type>object</type><parameter>link</parameter></methodparam> + </methodsynopsis> + <para>Object oriented style (property):</para> + <classsynopsis> + <ooclass><classname>mysqli</classname></ooclass> + <fieldsynopsis><type>string</type><varname>protocol_version</varname></fieldsynopsis> + </classsynopsis> <para> Returns an integer representing the MySQL protocol version used by the connection represented by the <parameter>link</parameter> parameter. </para> </refsect1> + <refsect1> + &reftitle.returnvalues; + <para> + Returns an integer representing the protcol version. + </para> + </refsect1> + <refsect1> + &reftitle.seealso; + <para> + <function>mysqli_get_host_info</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-get-server-info.xml?r1=1.3&r2=1.4&ty=u Index: phpdoc/en/reference/mysqli/functions/mysqli-get-server-info.xml diff -u phpdoc/en/reference/mysqli/functions/mysqli-get-server-info.xml:1.3 phpdoc/en/reference/mysqli/functions/mysqli-get-server-info.xml:1.4 --- phpdoc/en/reference/mysqli/functions/mysqli-get-server-info.xml:1.3 Fri May 23 14:07:23 2003 +++ phpdoc/en/reference/mysqli/functions/mysqli-get-server-info.xml Wed Jan 28 18:18:42 2004 @@ -1,22 +1,41 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.3 $ --> +<!-- $Revision: 1.4 $ --> <refentry id="function.mysqli-get-server-info"> <refnamediv> <refname>mysqli_get_server_info</refname> + <refname>mysqli->server_info</refname> <refpurpose>Returns the version of the MySQL server</refpurpose> </refnamediv> <refsect1> <title>Description</title> - <methodsynopsis> - <type>string</type><methodname>mysqli_get_server_info</methodname> - <methodparam><type>resource</type><parameter>link</parameter></methodparam> - </methodsynopsis> + <para>Procedural style:</para> + <methodsynopsis> + <type>string</type><methodname>mysqli_get_server_info</methodname> + <methodparam><type>object</type><parameter>link</parameter></methodparam> + </methodsynopsis> + <para>Object oriented style (property):</para> + <classsynopsis> + <ooclass><classname>mysqli</classname></ooclass> + <fieldsynopsis><type>string</type><varname>server_info</varname></fieldsynopsis> + </classsynopsis> <para> Returns a string representing the version of the MySQL server that the MySQLi extension is connected to (represented by the <parameter>link</parameter> parameter). </para> </refsect1> + <refsect1> + &reftitle.returnvalues; + <para> + A character string representing the server version. + </para> + </refsect1> + <refsect1> + &reftitle.seealso; + <para> + <function>mysqli_get_server_version</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-get-server-version.xml?r1=1.3&r2=1.4&ty=u Index: phpdoc/en/reference/mysqli/functions/mysqli-get-server-version.xml diff -u phpdoc/en/reference/mysqli/functions/mysqli-get-server-version.xml:1.3 phpdoc/en/reference/mysqli/functions/mysqli-get-server-version.xml:1.4 --- phpdoc/en/reference/mysqli/functions/mysqli-get-server-version.xml:1.3 Fri May 23 14:07:23 2003 +++ phpdoc/en/reference/mysqli/functions/mysqli-get-server-version.xml Wed Jan 28 18:18:42 2004 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.3 $ --> +<!-- $Revision: 1.4 $ --> <refentry id="function.mysqli-get-server-version"> <refnamediv> <refname>mysqli_get_server_version</refname> @@ -7,18 +7,39 @@ </refnamediv> <refsect1> <title>Description</title> + <para>Procedural style:</para> <methodsynopsis> <type>int</type><methodname>mysqli_get_server_version</methodname> - <methodparam><type>resource</type><parameter>link</parameter></methodparam> + <methodparam><type>object</type><parameter>link</parameter></methodparam> </methodsynopsis> + <para>Object oriented style (property):</para> + <classsynopsis> + <ooclass><classname>mysqli</classname></ooclass> + <fieldsynopsis><type>int</type><varname>server_version</varname></fieldsynopsis> + </classsynopsis> <para> The <function>mysqli_get_server_version</function> function returns the version of the server connected to (represented by the - <parameter>link</parameter> parameter) as an integer. The form of this - version number is main_version * 10000 + minor_version * 100 + sub_version + <parameter>link</parameter> parameter) as an integer. + </para> + <para> + The form of this version number is + <literal>main_version * 10000 + minor_version * 100 + sub_version</literal> (i.e. version 4.1.0 is 40100). </para> </refsect1> + <refsect1> + &reftitle.returnvalues; + <para> + An integer representing the server version. + </para> + </refsect1> + <refsect1> + &reftitle.seealso; + <para> + <function>mysqli_get_server_info</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-info.xml?r1=1.3&r2=1.4&ty=u Index: phpdoc/en/reference/mysqli/functions/mysqli-info.xml diff -u phpdoc/en/reference/mysqli/functions/mysqli-info.xml:1.3 phpdoc/en/reference/mysqli/functions/mysqli-info.xml:1.4 --- phpdoc/en/reference/mysqli/functions/mysqli-info.xml:1.3 Fri May 23 19:58:23 2003 +++ phpdoc/en/reference/mysqli/functions/mysqli-info.xml Wed Jan 28 18:18:42 2004 @@ -1,16 +1,23 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.3 $ --> +<!-- $Revision: 1.4 $ --> <refentry id="function.mysqli-info"> <refnamediv> <refname>mysqli_info</refname> + <refname>mysqli->info</refname> <refpurpose>Retrieves information about the most recently executed query</refpurpose> </refnamediv> <refsect1> <title>Description</title> + <para>Procedural style:</para> <methodsynopsis> <type>string</type><methodname>mysqli_info</methodname> - <methodparam><type>resource</type><parameter>link</parameter></methodparam> + <methodparam><type>object</type><parameter>link</parameter></methodparam> </methodsynopsis> + <para>Object oriented style (property)</para> + <classsynopsis> + <ooclass><classname>mysqli</classname></ooclass> + <fieldsynopsis><type>string</type><varname>info</varname></fieldsynopsis> + </classsynopsis> <para> The <function>mysqli_info</function> function returns a string providing information about the last query executed. The nature of this string is @@ -54,10 +61,24 @@ <note> <para> Queries which do not fall into one of the above formats are not supported. - In these situations, <function>mysqli_info</function> will return &false; + In these situations, <function>mysqli_info</function> will return an empty string. </para> </note> </refsect1> + <refsect1> + &reftitle.returnvalues; + <para> + A character string representing additional information about the most recently executed query. + </para> + </refsect1> + <refsect1> + &reftitle.seealso; + <para> + <function>mysqli_affected_rows</function>, + <function>mysqli_warning_count</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-init.xml?r1=1.2&r2=1.3&ty=u Index: phpdoc/en/reference/mysqli/functions/mysqli-init.xml diff -u phpdoc/en/reference/mysqli/functions/mysqli-init.xml:1.2 phpdoc/en/reference/mysqli/functions/mysqli-init.xml:1.3 --- phpdoc/en/reference/mysqli/functions/mysqli-init.xml:1.2 Thu Jun 12 03:49:15 2003 +++ phpdoc/en/reference/mysqli/functions/mysqli-init.xml Wed Jan 28 18:18:42 2004 @@ -1,21 +1,43 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.2 $ --> +<!-- $Revision: 1.3 $ --> <refentry id="function.mysqli-init"> <refnamediv> <refname>mysqli_init</refname> <refpurpose> - Initializes MySQLi and returns a resource for use with mysqli_real_connect + Initializes MySQLi and returns an object for use with mysqli_real_connect </refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> - <type>resource</type><methodname>mysqli_init</methodname> + <type>object</type><methodname>mysqli_init</methodname> <void/> </methodsynopsis> - - &warn.undocumented.func; - + <para> + Allocates or initializes a MYSQL object suitable for + <function>mysqli_options</function> and <function>mysqli_real_connect</function>. + </para> + <note> + <para> + Any subsequent calls to any mysqli function (except <function>mysqli_options</function>) + will fail until <function>mysqli_real_connect</function> was called. + </para> + </note> + </refsect1> + <refsect1> + &reftitle.returnvalues; + <para> + Returns an object. + </para> + </refsect1> + <refsect1> + &reftitle.seealso; + <para> + <function>mysqli_options</function>, + <function>mysqli_close</function>, + <function>mysqli_real_connect</function>, + <function>mysqli_connect</function> + </para> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc/en/reference/mysqli/functions/mysqli-insert-id.xml?r1=1.3&r2=1.4&ty=u Index: phpdoc/en/reference/mysqli/functions/mysqli-insert-id.xml diff -u phpdoc/en/reference/mysqli/functions/mysqli-insert-id.xml:1.3 phpdoc/en/reference/mysqli/functions/mysqli-insert-id.xml:1.4 --- phpdoc/en/reference/mysqli/functions/mysqli-insert-id.xml:1.3 Fri May 23 14:07:24 2003 +++ phpdoc/en/reference/mysqli/functions/mysqli-insert-id.xml Wed Jan 28 18:18:42 2004 @@ -1,16 +1,23 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.3 $ --> +<!-- $Revision: 1.4 $ --> <refentry id="function.mysqli-insert-id"> <refnamediv> <refname>mysqli_insert_id</refname> + <refname>mysqli->insert_id</refname> <refpurpose>Returns the auto generated id used in the last query</refpurpose> </refnamediv> <refsect1> <title>Description</title> + <para>Procedural style:</para> <methodsynopsis> <type>mixed</type><methodname>mysqli_insert_id</methodname> - <methodparam><type>resource</type><parameter>link</parameter></methodparam> + <methodparam><type>object</type><parameter>link</parameter></methodparam> </methodsynopsis> + <para>Object oriented style (property):</para> + <classsynopsis> + <ooclass><classname>mysqli</classname></ooclass> + <fieldsynopsis><type>mixed</type><varname>insert_id</varname></fieldsynopsis> + </classsynopsis> <para> The <function>mysqli_insert_id</function> function returns the ID generated by a query on a table with a column having the AUTO_INCREMENT attribute. If @@ -26,7 +33,22 @@ </para> </note> </refsect1> - </refentry> + <refsect1> + &reftitle.returnvalues; + <para> + The value of the <literal>AUTO_INCREMENT</literal> field that was updated + by the previous query. Returns zero if there was no previous query on the + connection or if the query did not update an <literal>AUTO_INCREMENT</literal> + value. + </para> + <note> + <para> + If the number is greater than maximal int value, <function>mysqli_insert_id</function> + will return a string. + </para> + </note> + </refsect1> + </refentry> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/diff.php/phpdoc/en/reference/mysqli/functions/mysqli-kill.xml?r1=1.4&r2=1.5&ty=u Index: phpdoc/en/reference/mysqli/functions/mysqli-kill.xml diff -u phpdoc/en/reference/mysqli/functions/mysqli-kill.xml:1.4 phpdoc/en/reference/mysqli/functions/mysqli-kill.xml:1.5 --- phpdoc/en/reference/mysqli/functions/mysqli-kill.xml:1.4 Sun May 25 15:09:28 2003 +++ phpdoc/en/reference/mysqli/functions/mysqli-kill.xml Wed Jan 28 18:18:42 2004 @@ -1,22 +1,49 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.4 $ --> +<!-- $Revision: 1.5 $ --> <refentry id="function.mysqli-kill"> <refnamediv> <refname>mysqli_kill</refname> + <refname>mysqli->kill</refname> <refpurpose>Asks the server to kill a MySQL thread</refpurpose> </refnamediv> <refsect1> <title>Description</title> + <para>Procedural style:</para> <methodsynopsis> <type>bool</type><methodname>mysqli_kill</methodname> - <methodparam><type>resource</type><parameter>link</parameter></methodparam> + <methodparam><type>object</type><parameter>link</parameter></methodparam> <methodparam><type>int</type><parameter>processid</parameter></methodparam> </methodsynopsis> - <para> + <para>Object oriented style (method)</para> + <classsynopsis> + <ooclass><classname>mysqli</classname></ooclass> + <methodsynopsis> + <type>bool</type> + <methodname>kill</methodname> + <methodparam><type>int</type><parameter>processid</parameter></methodparam> + </methodsynopsis> + </classsynopsis> + <para> This function is used to ask the server to kill a MySQL thread specified by the <parameter>processid</parameter> parameter. This value must be retrieved by calling the <function>mysqli_thread_id</function> function. </para> + <note> + <para> + To stop a running query you should use the SQL command + <literal>KILL QUERY processid</literal>. + </para> + </note> + </refsect1> + <refsect1> + &reftitle.returnvalues; + <para>&return.success;</para> + </refsect1> + <refsect1> + &reftitle.seealso; + <para> + <function>mysqli_thread_id</function> + </para> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc/en/reference/mysqli/functions/mysqli-num-fields.xml?r1=1.2&r2=1.3&ty=u Index: phpdoc/en/reference/mysqli/functions/mysqli-num-fields.xml diff -u phpdoc/en/reference/mysqli/functions/mysqli-num-fields.xml:1.2 phpdoc/en/reference/mysqli/functions/mysqli-num-fields.xml:1.3 --- phpdoc/en/reference/mysqli/functions/mysqli-num-fields.xml:1.2 Sat May 24 02:44:21 2003 +++ phpdoc/en/reference/mysqli/functions/mysqli-num-fields.xml Wed Jan 28 18:18:42 2004 @@ -1,21 +1,38 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.2 $ --> +<!-- $Revision: 1.3 $ --> <refentry id="function.mysqli-num-fields"> <refnamediv> <refname>mysqli_num_fields</refname> + <refname>result->num_fields</refname> <refpurpose> Get the number of fields in a result </refpurpose> </refnamediv> <refsect1> <title>Description</title> + <para>Procedural style:</para> <methodsynopsis> <type>int</type><methodname>mysqli_num_fields</methodname> - <methodparam><type>resource</type><parameter>result</parameter></methodparam> + <methodparam><type>object</type><parameter>result</parameter></methodparam> </methodsynopsis> - - &warn.undocumented.func; - + <para>Object oriented style (property):</para> + <classsynopsis> + <ooclass><classname>mysqli</classname></ooclass> + <fieldsynopsis><type>int</type><varname>field_count</varname></fieldsynopsis> + </classsynopsis> + <para> + <function>mysqli_num_fields</function> returns the number of fields from specified result set. + </para> + </refsect1> + <refsect1> + &reftitle.returnvalues; + <para>The number of fields from a result set</para> + </refsect1> + <refsect1> + &reftitle.seealso; + <para> + <function>mysqli_fetch_field</function> + </para> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc/en/reference/mysqli/functions/mysqli-num-rows.xml?r1=1.3&r2=1.4&ty=u Index: phpdoc/en/reference/mysqli/functions/mysqli-num-rows.xml diff -u phpdoc/en/reference/mysqli/functions/mysqli-num-rows.xml:1.3 phpdoc/en/reference/mysqli/functions/mysqli-num-rows.xml:1.4 --- phpdoc/en/reference/mysqli/functions/mysqli-num-rows.xml:1.3 Tue Jun 10 13:18:06 2003 +++ phpdoc/en/reference/mysqli/functions/mysqli-num-rows.xml Wed Jan 28 18:18:42 2004 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.3 $ --> +<!-- $Revision: 1.4 $ --> <refentry id="function.mysqli-num-rows"> <refnamediv> <refname>mysqli_num_rows</refname> @@ -9,13 +9,47 @@ </refnamediv> <refsect1> <title>Description</title> + <para>Procedural style:</para> <methodsynopsis> - <type>int</type><methodname>mysqli_num_rows</methodname> - <methodparam><type>resource</type><parameter>result</parameter></methodparam> + <type>mixed</type><methodname>mysqli_num_rows</methodname> + <methodparam><type>object</type><parameter>result</parameter></methodparam> </methodsynopsis> - - &warn.undocumented.func; - + <para>Object oriented style (property):</para> + <classsynopsis> + <ooclass><classname>mysqli</classname></ooclass> + <fieldsynopsis><type>mixed</type><varname>num_rows</varname></fieldsynopsis> + </classsynopsis> + <para> + Returns the number of rows in the result set. + </para> + <para> + The use of <function>mysqli_num_rows</function> depends on whether you use + buffered or unbuffered result sets. + In case you use unbuffered resultsets <function>mysqli_num_rows</function> + will not correct the correct number of rows until all the rows in the result + have been retrieved. + </para> + </refsect1> + <refsect1> + &reftitle.returnvalues; + <para> + Returns number of rows in the result set. + </para> + <note> + <para> + If the number of rows is greater than maximal int value, the number + will be returned as a string. + </para> + </note> + </refsect1> + <refsect1> + &reftitle.seealso; + <para> + <function>mysqli_affected_rows</function> + <function>mysqli_store_result</function> + <function>mysqli_use_result</function> + <function>mysqli_query</function> + </para> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc/en/reference/mysqli/functions/mysqli-options.xml?r1=1.2&r2=1.3&ty=u Index: phpdoc/en/reference/mysqli/functions/mysqli-options.xml diff -u phpdoc/en/reference/mysqli/functions/mysqli-options.xml:1.2 phpdoc/en/reference/mysqli/functions/mysqli-options.xml:1.3 --- phpdoc/en/reference/mysqli/functions/mysqli-options.xml:1.2 Sun May 25 14:02:46 2003 +++ phpdoc/en/reference/mysqli/functions/mysqli-options.xml Wed Jan 28 18:18:42 2004 @@ -1,21 +1,99 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.2 $ --> +<!-- $Revision: 1.3 $ --> <refentry id="function.mysqli-options"> <refnamediv> <refname>mysqli_options</refname> + <refname>mysqli->options</refname> <refpurpose>set options</refpurpose> </refnamediv> <refsect1> <title>Description</title> + <para>Procedural style:</para> <methodsynopsis> <type>bool</type><methodname>mysqli_options</methodname> - <methodparam><type>resource</type><parameter>link</parameter></methodparam> - <methodparam><type>int</type><parameter>flags</parameter></methodparam> - <methodparam><type>mixed</type><parameter>values</parameter></methodparam> + <methodparam><type>object</type><parameter>link</parameter></methodparam> + <methodparam><type>int</type><parameter>option</parameter></methodparam> + <methodparam><type>mixed</type><parameter>value</parameter></methodparam> </methodsynopsis> - - &warn.undocumented.func; - + <para>Object oriented style (method)</para> + <classsynopsis> + <ooclass><classname>mysqli</classname></ooclass> + <methodsynopsis> + <type>bool</type> + <methodname>options</methodname> + <methodparam><type>int</type><parameter>option</parameter></methodparam> + <methodparam><type>mixed</type><parameter>value</parameter></methodparam> + </methodsynopsis> + </classsynopsis> + <para> + <function>mysqli_options</function> can be used to set extra connect options + and affect behavior for a connection. + </para> + <para> + This function may be called multiple times to set several options. + </para> + <para> + <function>mysqli_options</function> should be called after <function>mysqli_init</function> + and before <function>mysqli_real_connect</function>. + </para> + <para> + The parameter <parameter>option</parameter> is the option that you want to set, + the <parameter>value</parameter> is the value for the option. + The parameter <parameter>option</parameter> can be one of the following values: + <table> + <title>Valid options</title> + <tgroup cols='2'> + <thead> + <row> + <entry>Name</entry> + <entry>Description</entry> + </row> + </thead> + <tbody> + <row> + <entry><constant>MYSQLI_OPT_CONNECT_TIMEOUT</constant></entry> + <entry>connection timeout in seconds</entry> + </row> + <row> + <entry><constant>MYSQLI_OPT_COMPRESS</constant></entry> + <entry>use compression protocol</entry> + </row> + <row> + <entry><constant>MYSQLI_OPT_LOCAL_INFILE</constant></entry> + <entry>enable/disable use of <literal>LOAD LOCAL INFILE</literal></entry> + </row> + <row> + <entry><constant>MYSQLI_INIT_CMD</constant></entry> + <entry>command to execute after when connecting to MySQL server</entry> + </row> + <row> + <entry><constant>MYSQLI_READ_DEFAULT_FILE</constant></entry> + <entry> + Read options from named option file instead of <filename>my.cnf</filename> + </entry> + </row> + <row> + <entry><constant>MYSQLI_READ_DEFAULT_GROUP</constant></entry> + <entry> + Read options from the named group from <filename>my.cnf</filename> + or the file specified with <constant>MYSQL_READ_DEFAULT_FILE</constant>. + </entry> + </row> + </tbody> + </tgroup> + </table> + </para> + </refsect1> + <refsect1> + &reftitle.returnvalues; + <para>&return.success;</para> + </refsect1> + <refsect1> + &reftitle.seealso; + <para> + <function>mysqli_init</function>, + <function>mysqli_real_connect</function> + </para> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc/en/reference/mysqli/functions/mysqli-param-count.xml?r1=1.3&r2=1.4&ty=u Index: phpdoc/en/reference/mysqli/functions/mysqli-param-count.xml diff -u phpdoc/en/reference/mysqli/functions/mysqli-param-count.xml:1.3 phpdoc/en/reference/mysqli/functions/mysqli-param-count.xml:1.4 --- phpdoc/en/reference/mysqli/functions/mysqli-param-count.xml:1.3 Sun May 25 14:02:46 2003 +++ phpdoc/en/reference/mysqli/functions/mysqli-param-count.xml Wed Jan 28 18:18:42 2004 @@ -1,19 +1,38 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.3 $ --> +<!-- $Revision: 1.4 $ --> <refentry id="function.mysqli-param-count"> <refnamediv> <refname>mysqli_param_count</refname> + <refname>stmt->param_count</refname> <refpurpose>Returns the number of parameter for the given statement</refpurpose> </refnamediv> <refsect1> <title>Description</title> + <para>Procedural style:</para> <methodsynopsis> <type>int</type><methodname>mysqli_param_count</methodname> - <methodparam><type>resource</type><parameter>stmt</parameter></methodparam> + <methodparam><type>object</type><parameter>stmt</parameter></methodparam> </methodsynopsis> - - &warn.undocumented.func; - + <para>Object oriented style (property):</para> + <classsynopsis> + <ooclass><classname>stmt</classname></ooclass> + <fieldsynopsis><type>int</type><varname>param_count</varname></fieldsynopsis> + </classsynopsis> + <para> + <function>mysqli_param_count</function> returns the number of parameter + markers present in the prepared statement. + </para> + </refsect1> + &reftitle.returnvalues; + <para> + returns an integer representing the number of parameters. + </para> + </refsect1> + <refsect1> + &reftitle.seealso; + <para> + <function>mysqli_prepare</function> + </para> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc/en/reference/mysqli/functions/mysqli-ping.xml?r1=1.2&r2=1.3&ty=u Index: phpdoc/en/reference/mysqli/functions/mysqli-ping.xml diff -u phpdoc/en/reference/mysqli/functions/mysqli-ping.xml:1.2 phpdoc/en/reference/mysqli/functions/mysqli-ping.xml:1.3 --- phpdoc/en/reference/mysqli/functions/mysqli-ping.xml:1.2 Sat May 24 02:44:21 2003 +++ phpdoc/en/reference/mysqli/functions/mysqli-ping.xml Wed Jan 28 18:18:42 2004 @@ -1,21 +1,41 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.2 $ --> +<!-- $Revision: 1.3 $ --> <refentry id="function.mysqli-ping"> <refnamediv> <refname>mysqli_ping</refname> + <refname>mysqli->ping</refname> <refpurpose> - Ping a server connection, or reconnect if there is no connection + Pings a server connection, or tries to reconnect if the connection has gone down. </refpurpose> </refnamediv> <refsect1> <title>Description</title> + <para>Procedural style:</para> + <methodsynopsis> + <type>int</type><methodname>mysqli_ping</methodname> + <methodparam><type>object</type><parameter>link</parameter></methodparam> + </methodsynopsis> + <para>Object oriented style (method):</para> + <classsynopsis> + <ooclass><classname>mysqli</classname></ooclass> <methodsynopsis> - <type>int</type><methodname>mysqli_ping</methodname> - <methodparam><type>resource</type><parameter>link</parameter></methodparam> + <type>int</type><methodname>ping</methodname> + <methodparam><type>void</type><parameter></parameter></methodparam> </methodsynopsis> - - &warn.undocumented.func; - + </classsynopsis> + <para> + Checks whether the connection to the server is working. If it has gone + down, an automatic reconnection is attempted. + </para> + <para> + This function can be used by clients that remain idle for a long while, + to check whether the server has closed the connection and reconnect if + necessary. + </para> + <para> + <function>mysqli_ping</function> returns 0 if the connection is alive + and non-zero value if an error has occured. + </para> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc/en/reference/mysqli/functions/mysqli-prepare.xml?r1=1.2&r2=1.3&ty=u Index: phpdoc/en/reference/mysqli/functions/mysqli-prepare.xml diff -u phpdoc/en/reference/mysqli/functions/mysqli-prepare.xml:1.2 phpdoc/en/reference/mysqli/functions/mysqli-prepare.xml:1.3 --- phpdoc/en/reference/mysqli/functions/mysqli-prepare.xml:1.2 Sat May 24 02:44:21 2003 +++ phpdoc/en/reference/mysqli/functions/mysqli-prepare.xml Wed Jan 28 18:18:42 2004 @@ -1,22 +1,84 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.2 $ --> +<!-- $Revision: 1.3 $ --> <refentry id="function.mysqli-prepare"> <refnamediv> <refname>mysqli_prepare</refname> + <refname>stmt->prepare</refname> <refpurpose> Prepare a SQL statement for execution </refpurpose> </refnamediv> <refsect1> <title>Description</title> + <para>Procedure style:</para> <methodsynopsis> - <type>resource</type><methodname>mysqli_prepare</methodname> - <methodparam><type>resource</type><parameter>link</parameter></methodparam> + <type>mixed</type><methodname>mysqli_prepare</methodname> + <methodparam><type>object</type><parameter>link</parameter></methodparam> <methodparam><type>string</type><parameter>query</parameter></methodparam> </methodsynopsis> - - &warn.undocumented.func; - + <para>Object oriented style (method)</para> + <classsynopsis> + <ooclass><classname>stmt</classname></ooclass> + <methodsynopsis> + <type>mixed</type> + <methodname>prepare</methodname> + <methodparam><type>string</type><parameter>query</parameter></methodparam> + </methodsynopsis> + </classsynopsis> + <para> + <function>mysqli_prepare</function> prepares the SQL query pointed to by the + null-terminated string query, and returns a statement handle to be used for + further operations on the statement. The query must consist of a single SQL statement. + </para> + <note> + <para> + You should not add a terminating semicolon or <literal>\g</literal> + to the statement. + </para> + </note> + <para> + The parameter <parameter>query</parameter> can include one or more parameter markers + in the SQL statement by embedding question mark (<literal>?</literal>) characters + at the appropriate positions. + </para> + <note> + <para> + The markers are legal only in certain places in SQL statements. + For example, they are allowed in the VALUES() list of an INSERT statement + (to specify column values for a row), or in a comparison with a column in + a WHERE clause to specify a comparison value. + </para> + <para> + However, they are not allowed for identifiers (such as table or column names), + in the select list that names the columns to be returned by a SELECT statement), + or to specify both operands of a binary operator such as the <literal>=</literal> + equal sign. The latter restriction is necessary because it would be impossible + to determine the parameter type. In general, parameters are legal only in Data + Manipulation Languange (DML) statements, and not in Data Defination Language + (DDL) statements. + </para> + </note> + <para> + The parameter markers must be bound to application variables using + <function>mysqli_bind_param</function> and/or <function>mysqli_bind_result</function> + before executing the statement or fetching rows. + </para> + </refsect1> + <refsect1> + &reftitle.returnvalues; + <para> + <function>mysqli_prepare</function> returns a statement object or &false; if an error occured. + </para> + </refsect1> + <refsect1> + &reftitle.seealso; + <para> + <function>mysqli_execute</function> + <function>mysqli_fetch</function> + <function>mysqli_bind_param</function> + <function>mysqli_bind_result</function> + <function>mysqli_stmt_close</function> + </para> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc/en/reference/mysqli/functions/mysqli-query.xml?r1=1.4&r2=1.5&ty=u Index: phpdoc/en/reference/mysqli/functions/mysqli-query.xml diff -u phpdoc/en/reference/mysqli/functions/mysqli-query.xml:1.4 phpdoc/en/reference/mysqli/functions/mysqli-query.xml:1.5 --- phpdoc/en/reference/mysqli/functions/mysqli-query.xml:1.4 Sun May 25 15:09:28 2003 +++ phpdoc/en/reference/mysqli/functions/mysqli-query.xml Wed Jan 28 18:18:42 2004 @@ -1,30 +1,66 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.4 $ --> +<!-- $Revision: 1.5 $ --> <refentry id="function.mysqli-query"> <refnamediv> <refname>mysqli_query</refname> + <refname>mysqli->query</refname> <refpurpose>Performs a query on the database</refpurpose> </refnamediv> <refsect1> <title>Description</title> + <para>Procedural style:</para> + <methodsynopsis> + <type>mixed</type><methodname>mysqli_query</methodname> + <methodparam><type>object</type><parameter>link</parameter></methodparam> + <methodparam><type>string</type><parameter>query</parameter></methodparam> + <methodparam choice='opt'><type>int</type><parameter>resultmode</parameter></methodparam> + </methodsynopsis> + <para>Object oriented style (method):</para> + <classsynopsis> + <ooclass><classname>mysqli</classname></ooclass> <methodsynopsis> - <type>resource</type><methodname>mysqli_query</methodname> - <methodparam><type>resource</type><parameter>link</parameter></methodparam> + <type>mixed</type> + <methodname>query</methodname> <methodparam><type>string</type><parameter>query</parameter></methodparam> - <methodparam choice='opt'><type>int</type><parameter>resultmode</parameter></methodparam> </methodsynopsis> + </classsynopsis> <para> The <function>mysqli_query</function> function is used to simplify the act of performing a query against the database represented by the - <parameter>link</parameter> parameter. Functionally, using this + <parameter>link</parameter> parameter. + </para> + <para> + Functionally, using this function is identical to calling <function>mysqli_real_query</function> followed either by <function>mysqli_use_result</function> or <function>mysqli_store_result</function> where <parameter>query</parameter> is the query string itself and <parameter>resultmode</parameter> is - either the constant MYSQLI_USE_RESULT or MYSQLI_STORE_RESULT depending + either the constant <literal>MYSQLI_USE_RESULT</literal> or + <literal>MYSQLI_STORE_RESULT</literal> depending on the desired behavior. By default, if the - <parameter>resultmode</parameter> is not provided MYSQLI_STORE_RESULT - is used. + <parameter>resultmode</parameter> is not provided + <literal>MYSQLI_STORE_RESULT</literal> is used. + </para> + <para> + If you execute <function>mysqli_query</function> with <parameter>resultmode</parameter> + <literal>MYSQLI_USE_RESULT</literal> all subsequent calls will return error + <literal>Commands out of sync</literal> unless you call <function>mysqli_free_result</function>. + </para> + </refsect1> + <refsect1> + <title>Return values</title> + <para> + &return.success; For <literal>SELECT, SHOW, DESCRIBE</literal> or + <literal>EXPLAIN</literal> <function>mysqli_query</function> will return + a result object. + </para> + </refsect1> + <refsect1> + <title>See also</title> + <para> + <function>mysqli_real_query</function>, + <function>mysqli_multi_query</function>, + <function>mysqli_free_result</function> </para> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc/en/reference/mysqli/functions/mysqli-real-connect.xml?r1=1.3&r2=1.4&ty=u Index: phpdoc/en/reference/mysqli/functions/mysqli-real-connect.xml diff -u phpdoc/en/reference/mysqli/functions/mysqli-real-connect.xml:1.3 phpdoc/en/reference/mysqli/functions/mysqli-real-connect.xml:1.4 --- phpdoc/en/reference/mysqli/functions/mysqli-real-connect.xml:1.3 Sun May 25 14:02:46 2003 +++ phpdoc/en/reference/mysqli/functions/mysqli-real-connect.xml Wed Jan 28 18:18:42 2004 @@ -1,28 +1,119 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.3 $ --> +<!-- $Revision: 1.4 $ --> <refentry id="function.mysqli-real-connect"> <refnamediv> <refname>mysqli_real_connect</refname> + <refname>mysqli->real_connect</refname> <refpurpose>Opens a connection to a mysql server</refpurpose> </refnamediv> <refsect1> <title>Description</title> + <para>Procedural style</para> <methodsynopsis> <type>bool</type><methodname>mysqli_real_connect</methodname> - <methodparam><type>resource</type><parameter>link</parameter></methodparam> + <methodparam><type>object</type><parameter>link</parameter></methodparam> <methodparam choice='opt'><type>string</type><parameter>hostname</parameter></methodparam> <methodparam choice='opt'><type>string</type><parameter>username</parameter></methodparam> <methodparam choice='opt'><type>string</type><parameter>passwd</parameter></methodparam> <methodparam choice='opt'><type>string</type><parameter>dbname</parameter></methodparam> <methodparam choice='opt'><type>int</type><parameter>port</parameter></methodparam> <methodparam choice='opt'><type>string</type><parameter>socket</parameter></methodparam> + <methodparam choice='opt'><type>int</type><parameter>flags</parameter></methodparam> </methodsynopsis> - - &warn.undocumented.func; - + <para>Object oriented style (method)</para> + <classsynopsis> + <ooclass><classname>mysqli</classname></ooclass> + <methodsynopsis> + <type>bool</type> + <methodname>real_connect</methodname> + <methodparam choice='opt'><type>string</type><parameter>hostname</parameter></methodparam> + <methodparam choice='opt'><type>string</type><parameter>username</parameter></methodparam> + <methodparam choice='opt'><type>string</type><parameter>passwd</parameter></methodparam> + <methodparam choice='opt'><type>string</type><parameter>dbname</parameter></methodparam> + <methodparam choice='opt'><type>int</type><parameter>port</parameter></methodparam> + <methodparam choice='opt'><type>string</type><parameter>socket</parameter></methodparam> + <methodparam choice='opt'><type>int</type><parameter>flags</parameter></methodparam> + </methodsynopsis> + </classsynopsis> + <para> + mysql_real_connect() attempts to establish a connection to a MySQL database engine running on host. + </para> + <para> + This function differs from <function>mysqli_connect</function>: + </para> + <itemizedlist> + <listitem> + <para> + <function>mysqli_real_connect</function> needs a valid object which has to be created by function + <function>mysqli_init</function> + </para> + </listitem> + <listitem> + <para> + With function <function>mysqli_options</function> you can set various options for connection. + </para> + </listitem> + <listitem> + <para> + With the parameter <parameter>flags</parameter> you can set diffrent connection options: + </para> + <table> + <title>Supported flags</title> + <tgroup cols='2'> + <thead> + <row> + <entry>Name</entry> + <entry>Description</entry> + </row> + </thead> + <tbody> + <row> + <entry><literal>MYSQLI_CLIENT_COMPRESS</literal></entry> + <entry>Use compression protocol</entry> + </row> + <row> + <entry><literal>MYSQLI_CLIENT_FOUND_ROWS</literal></entry> + <entry>return number of matched rows, not the number of affected rows</entry> + </row> + <row> + <entry><literal>MYSQLI_CLIENT_IGNORE_SPACE</literal></entry> + <entry>Allow spaces after function names. Makes all function names reserved words.</entry> + </row> + <row> + <entry><literal>MYSQLI_CLIENT_INTERACTIVE</literal></entry> + <entry> + Allow <literal>interactive_timeout</literal> seconds (instead of + <literal>wait_timeout</literal> seconds) of inactivity before closing the connection + </entry> + </row> + <row> + <entry><literal>MYSQLI_CLIENT_SSL</literal></entry> + <entry>Use SSL (encryption)</entry> + </row> + </tbody> + </tgroup> + </table> + <note> + <para> + For security reasons the <literal>MULTI_STATEMENT</literal> flag is not supported in + PHP. If you want to execute multiple queries use the + <function>mysqli_multi_query</function> function. + </para> + </note> + </listitem> + </itemizedlist> + </refsect1> + <refsect1> + &reftitle.returnvalues; + <para>&return.success;</para> + </refsect1> + <refsect1> + &reftitle.seealso; <para> - See also - <function>mysqli_connect</function> and + <function>mysqli_connect</function>, + <function>mysqli_init</function>, + <function>mysqli_options</function>, + <function>mysqli_ssl_set</function>, <function>mysqli_close</function>. </para> </refsect1> http://cvs.php.net/diff.php/phpdoc/en/reference/mysqli/functions/mysqli-real-escape-string.xml?r1=1.4&r2=1.5&ty=u Index: phpdoc/en/reference/mysqli/functions/mysqli-real-escape-string.xml diff -u phpdoc/en/reference/mysqli/functions/mysqli-real-escape-string.xml:1.4 phpdoc/en/reference/mysqli/functions/mysqli-real-escape-string.xml:1.5 --- phpdoc/en/reference/mysqli/functions/mysqli-real-escape-string.xml:1.4 Sun May 25 15:09:28 2003 +++ phpdoc/en/reference/mysqli/functions/mysqli-real-escape-string.xml Wed Jan 28 18:18:42 2004 @@ -1,8 +1,9 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.4 $ --> +<!-- $Revision: 1.5 $ --> <refentry id="function.mysqli-real-escape-string"> <refnamediv> <refname>mysqli_real_escape_string</refname> + <refname>mysqli->real_escape_string</refname> <refpurpose> Escapes special characters in a string for use in a SQL statement, taking into account the current charset of the connection @@ -10,18 +11,42 @@ </refnamediv> <refsect1> <title>Description</title> + <para>Procedural style:</para> <methodsynopsis> <type>string</type><methodname>mysqli_real_escape_string</methodname> - <methodparam><type>resource</type><parameter>link</parameter></methodparam> + <methodparam><type>object</type><parameter>link</parameter></methodparam> <methodparam><type>string</type><parameter>escapestr</parameter></methodparam> </methodsynopsis> - - &warn.undocumented.func; - + <para>Object oriented style (method):</para> + <classsynopsis> + <ooclass><classname>mysqli</classname></ooclass> + <methodsynopsis> + <type>string</type> + <methodname>real_escape_sring</methodname> + <methodparam><type>string</type><parameter>query</parameter></methodparam> + </methodsynopsis> + </classsynopsis> + <para> + This function is used to create a legal SQL string that you can use in a SQL statement. + The string <literal>escapestr</literal> is encoded to an escaped SQL string, taking into + account the current character set of the connection. + </para> <para> - See also <function>mysqli_character_set_name</function>. + Characters encoded are <literal>NUL (ASCII 0), \n, \r, \, ', ", and Control-Z</literal>. </para> </refsect1> + <refsect1> + <title>Return values</title> + <para> + Returns an escaped string. + </para> + </refsect1> + <refsect1> + <title>See also</title> + <para> + <function>mysqli_character_set_name</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-real-query.xml?r1=1.4&r2=1.5&ty=u Index: phpdoc/en/reference/mysqli/functions/mysqli-real-query.xml diff -u phpdoc/en/reference/mysqli/functions/mysqli-real-query.xml:1.4 phpdoc/en/reference/mysqli/functions/mysqli-real-query.xml:1.5 --- phpdoc/en/reference/mysqli/functions/mysqli-real-query.xml:1.4 Sun May 25 15:09:28 2003 +++ phpdoc/en/reference/mysqli/functions/mysqli-real-query.xml Wed Jan 28 18:18:42 2004 @@ -1,17 +1,28 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.4 $ --> +<!-- $Revision: 1.5 $ --> <refentry id="function.mysqli-real-query"> <refnamediv> <refname>mysqli_real_query</refname> + <refname>mysqli->real_query</refname> <refpurpose>Execute an SQL query</refpurpose> </refnamediv> <refsect1> <title>Description</title> + <para>Procedural style</para> <methodsynopsis> <type>bool</type><methodname>mysqli_real_query</methodname> - <methodparam><type>resource</type><parameter>link</parameter></methodparam> + <methodparam><type>object</type><parameter>link</parameter></methodparam> <methodparam><type>string</type><parameter>query</parameter></methodparam> </methodsynopsis> + <para>Object oriented style (method):</para> + <classsynopsis> + <ooclass><classname>mysqli</classname></ooclass> + <methodsynopsis> + <type>bool</type> + <methodname>real_query</methodname> + <methodparam><type>string</type><parameter>query</parameter></methodparam> + </methodsynopsis> + </classsynopsis> <para> The <function>mysqli_real_query</function> function is used to execute only a query against the database represented by the <parameter>link</parameter> @@ -26,6 +37,20 @@ </para> </note> </refsect1> + <refsect1> + <title>Return values</title> + <para> + &return.success; + </para> + </refsect1> + <refsect1> + <title>See also</title> + <para> + <function>mysqli_query</function> + <function>mysqli_store_result</function> + <function>mysqli_use_result</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-rollback.xml?r1=1.2&r2=1.3&ty=u Index: phpdoc/en/reference/mysqli/functions/mysqli-rollback.xml diff -u phpdoc/en/reference/mysqli/functions/mysqli-rollback.xml:1.2 phpdoc/en/reference/mysqli/functions/mysqli-rollback.xml:1.3 --- phpdoc/en/reference/mysqli/functions/mysqli-rollback.xml:1.2 Sun May 25 14:02:46 2003 +++ phpdoc/en/reference/mysqli/functions/mysqli-rollback.xml Wed Jan 28 18:18:42 2004 @@ -1,19 +1,42 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.2 $ --> +<!-- $Revision: 1.3 $ --> <refentry id="function.mysqli-rollback"> <refnamediv> <refname>mysqli_rollback</refname> - <refpurpose></refpurpose> + <refname>mysqli->rollback</refname> + <refpurpose>Rolls back current transaction</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>bool</type><methodname>mysqli_rollback</methodname> - <methodparam><type>resource</type><parameter>link</parameter></methodparam> + <methodparam><type>object</type><parameter>link</parameter></methodparam> </methodsynopsis> - - &warn.undocumented.func; - + <classsynopsis> + <ooclass><classname>mysqli</classname></ooclass> + <methodsynopsis> + <type>bool</type> + <methodname>rollback</methodname> + <methodparam><type>void</type><parameter></parameter></methodparam> + </methodsynopsis> + </classsynopsis> + <para> + Rollbacks the current transaction for the database specified by the + <parameter>link</parameter> parameter. + </para> + </refsect1> + <refsect1> + <title>Return values</title> + <para> + &return.success; + </para> + </refsect1> + <refsect1> + <title>See also</title> + <para> + <function>mysqli_commit</function> + <function>mysqli_autocommit</function> + </para> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc/en/reference/mysqli/functions/mysqli-select-db.xml?r1=1.5&r2=1.6&ty=u Index: phpdoc/en/reference/mysqli/functions/mysqli-select-db.xml diff -u phpdoc/en/reference/mysqli/functions/mysqli-select-db.xml:1.5 phpdoc/en/reference/mysqli/functions/mysqli-select-db.xml:1.6 --- phpdoc/en/reference/mysqli/functions/mysqli-select-db.xml:1.5 Sat May 24 22:04:10 2003 +++ phpdoc/en/reference/mysqli/functions/mysqli-select-db.xml Wed Jan 28 18:18:42 2004 @@ -1,15 +1,16 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.5 $ --> +<!-- $Revision: 1.6 $ --> <refentry id="function.mysqli-select-db"> <refnamediv> <refname>mysqli_select_db</refname> + <refname>mysqli->select_db</refname> <refpurpose>Selects the default database for database queries</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>bool</type><methodname>mysqli_select_db</methodname> - <methodparam><type>resource</type><parameter>link</parameter></methodparam> + <methodparam><type>object</type><parameter>link</parameter></methodparam> <methodparam><type>string</type><parameter>dbname</parameter></methodparam> </methodsynopsis> <para> @@ -18,10 +19,26 @@ used when performing queries against the database connection represented by the <parameter>link</parameter> parameter. </para> + <note> + <para> + This function should only be used to change the default database for the connection. + You can select the default database with 4th parameter in <function>mysqli_connect</function>. + </para> + </note> + </refsect1> + <refsect1> + <title>Return values</title> <para> &return.success; </para> </refsect1> + <refsect1> + <title>See also</title> + <para> + <function>mysqli_connect</function> + <function>mysqli_real_connect</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-send-long-data.xml?r1=1.2&r2=1.3&ty=u Index: phpdoc/en/reference/mysqli/functions/mysqli-send-long-data.xml diff -u phpdoc/en/reference/mysqli/functions/mysqli-send-long-data.xml:1.2 phpdoc/en/reference/mysqli/functions/mysqli-send-long-data.xml:1.3 --- phpdoc/en/reference/mysqli/functions/mysqli-send-long-data.xml:1.2 Sun May 25 14:02:46 2003 +++ phpdoc/en/reference/mysqli/functions/mysqli-send-long-data.xml Wed Jan 28 18:18:42 2004 @@ -1,21 +1,50 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.2 $ --> +<!-- $Revision: 1.3 $ --> <refentry id="function.mysqli-send-long-data"> <refnamediv> <refname>mysqli_send_long_data</refname> - <refpurpose></refpurpose> + <refname>stmt->send_long_data</refname> + <refpurpose>Send data in blocks</refpurpose> </refnamediv> <refsect1> <title>Description</title> + <para>Procedural style:</para> <methodsynopsis> <type>bool</type><methodname>mysqli_send_long_data</methodname> - <methodparam><type>resource</type><parameter>stmt</parameter></methodparam> + <methodparam><type>object</type><parameter>stmt</parameter></methodparam> <methodparam><type>int</type><parameter>param_nr</parameter></methodparam> <methodparam><type>string</type><parameter>data</parameter></methodparam> </methodsynopsis> - - &warn.undocumented.func; - + <para>Object oriented style (method)</para> + <classsynopsis> + <ooclass><classname>stmt</classname></ooclass> + <methodsynopsis> + <type>bool</type><methodname>send_long_data</methodname> + <methodparam><type>int</type><parameter>param_nr</parameter></methodparam> + <methodparam><type>string</type><parameter>data</parameter></methodparam> + </methodsynopsis> + </classsynopsis> + <para> + Allows to send parameter data to the server in pieces (or chunks), e.g. if the + size of a blob exceeds the size of <literal>max_allowed_packet</literal>. + This function can be called multiple times to send the parts of a character or + binary data value for a column, which must be one of the TEXT or BLOB datatypes. + </para> + <para> + <parameter>param_nr</parameter> indicates which parameter to associate the data with. + Parameters are numbered beginning with 0. data is a string containing data to be sent. + </para> + </refsect1> + <refsect1> + <title>Return values</title> + <para>&return.success;</para> + </refsect1> + <refsect1> + <title>See also</title> + <para> + <function>mysqli_prepare</function>, + <function>mysqli_bind_param</function> + </para> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc/en/reference/mysqli/functions/mysqli-ssl-set.xml?r1=1.2&r2=1.3&ty=u Index: phpdoc/en/reference/mysqli/functions/mysqli-ssl-set.xml diff -u phpdoc/en/reference/mysqli/functions/mysqli-ssl-set.xml:1.2 phpdoc/en/reference/mysqli/functions/mysqli-ssl-set.xml:1.3 --- phpdoc/en/reference/mysqli/functions/mysqli-ssl-set.xml:1.2 Sun May 25 14:02:46 2003 +++ phpdoc/en/reference/mysqli/functions/mysqli-ssl-set.xml Wed Jan 28 18:18:42 2004 @@ -1,24 +1,66 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.2 $ --> +<!-- $Revision: 1.3 $ --> <refentry id="function.mysqli-ssl-set"> <refnamediv> <refname>mysqli_ssl_set</refname> - <refpurpose></refpurpose> + <refname>mysqli->ssl_set</refname> + <refpurpose>Used for establishing secure connections using SSL.</refpurpose> </refnamediv> <refsect1> <title>Description</title> + <para>Procedural style:</para> + <methodsynopsis> + <type>bool</type><methodname>mysqli_ssl_set</methodname> + <methodparam><type>object</type><parameter>link</parameter></methodparam> + <methodparam choice='opt'><type>string</type><parameter>key</parameter></methodparam> + <methodparam choice='opt'><type>string</type><parameter>cert</parameter></methodparam> + <methodparam choice='opt'><type>string</type><parameter>ca</parameter></methodparam> + <methodparam choice='opt'><type>string</type><parameter>capath</parameter></methodparam> + <methodparam choice='opt'><type>string</type><parameter>cipher</parameter></methodparam> + </methodsynopsis> + <para>Object oriented style (method):</para> + <classsynopsis> + <ooclass><classname>mysqli</classname></ooclass> <methodsynopsis> - <type>string</type><methodname>mysqli_ssl_set</methodname> - <methodparam><type>resource</type><parameter>link</parameter></methodparam> + <type>bool</type><methodname>ssl_set</methodname> <methodparam choice='opt'><type>string</type><parameter>key</parameter></methodparam> <methodparam choice='opt'><type>string</type><parameter>cert</parameter></methodparam> <methodparam choice='opt'><type>string</type><parameter>ca</parameter></methodparam> <methodparam choice='opt'><type>string</type><parameter>capath</parameter></methodparam> <methodparam choice='opt'><type>string</type><parameter>cipher</parameter></methodparam> </methodsynopsis> - - &warn.undocumented.func; - + </classsynopsis> + <para> + The function <function>mysqli_ssl_set</function> is used for establishing + secure connections using SSL. It must be called before + <function>mysqli_real_connect</function>. This function does nothing + unless OpenSSL support is enabled. + </para> + <para> + <parameter>key</parameter> is the pathname to the key file. + <parameter>cert</parameter> is the pathname to the certificate file. + <parameter>ca</parameter> is the pathname to the certificate authority file. + <parameter>capath</parameter> is the pathname to a directory that contains + trusted SSL CA certificates in pem format. + <parameter>cipher</parameter> is a list of allowable ciphers to use for + SSL encryption. + Any unused SSL parameters may be given as &null; + </para> + </refsect1> + <refsect1> + <title>Return values</title> + <para> + This function always returns &true; value. If SSL setup is + incorrect <function>mysqli_real_connect</function> will return an error + when you attempt to connect. + </para> + </refsect1> + <refsect1> + <title>See also</title> + <para> + <function>mysqli_options</function>, + <function>mysqli_real_connect</function> + </para> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc/en/reference/mysqli/functions/mysqli-stat.xml?r1=1.2&r2=1.3&ty=u Index: phpdoc/en/reference/mysqli/functions/mysqli-stat.xml diff -u phpdoc/en/reference/mysqli/functions/mysqli-stat.xml:1.2 phpdoc/en/reference/mysqli/functions/mysqli-stat.xml:1.3 --- phpdoc/en/reference/mysqli/functions/mysqli-stat.xml:1.2 Sat May 24 02:44:21 2003 +++ phpdoc/en/reference/mysqli/functions/mysqli-stat.xml Wed Jan 28 18:18:42 2004 @@ -1,21 +1,44 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.2 $ --> +<!-- $Revision: 1.3 $ --> <refentry id="function.mysqli-stat"> <refnamediv> <refname>mysqli_stat</refname> - <refpurpose> - Gets the current system status - </refpurpose> + <refname>mysqli->stat</refname> + <refpurpose>Gets the current system status</refpurpose> </refnamediv> <refsect1> <title>Description</title> + <para>Procedural style:</para> + <methodsynopsis> + <type>string</type><methodname>mysqli_stat</methodname> + <methodparam><type>object</type><parameter>link</parameter></methodparam> + </methodsynopsis> + <para>Object oriented style (method):</para> + <classsynopsis> + <ooclass><classname>mysqli</classname></ooclass> <methodsynopsis> - <type>string</type><methodname>mysqli_stat</methodname> - <methodparam><type>resource</type><parameter>link</parameter></methodparam> + <type>string</type><methodname>mysqli->stat</methodname> + <methodparam><type>void</type><parameter></parameter></methodparam> </methodsynopsis> - - &warn.undocumented.func; - + </classsynopsis> + <para> + <function>mysqli_stat</function> returns a string containing + information similar to that provided by the 'mysqladmin status' command. + This includes uptime in seconds and the number of running threads, + questions, reloads, and open tables. + </para> + </refsect1> + <refsect1> + <title>Return values</title> + <para> + A string describing the server status. &false; if an error occurred. + </para> + </refsect1> + <refsect1> + <title>See also</title> + <para> + <function>mysqli_get_server_info</function> + </para> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc/en/reference/mysqli/functions/mysqli-stmt-affected-rows.xml?r1=1.2&r2=1.3&ty=u Index: phpdoc/en/reference/mysqli/functions/mysqli-stmt-affected-rows.xml diff -u phpdoc/en/reference/mysqli/functions/mysqli-stmt-affected-rows.xml:1.2 phpdoc/en/reference/mysqli/functions/mysqli-stmt-affected-rows.xml:1.3 --- phpdoc/en/reference/mysqli/functions/mysqli-stmt-affected-rows.xml:1.2 Sun May 25 14:02:46 2003 +++ phpdoc/en/reference/mysqli/functions/mysqli-stmt-affected-rows.xml Wed Jan 28 18:18:42 2004 @@ -1,19 +1,62 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.2 $ --> +<!-- $Revision: 1.3 $ --> <refentry id="function.mysqli-stmt-affected-rows"> <refnamediv> <refname>mysqli_stmt_affected_rows</refname> - <refpurpose></refpurpose> + <refname>mysqli_stmt->affected_rows</refname> + <refpurpose>Returns the total number of rows changed, deleted, or + inserted by the last executed statement + </refpurpose> </refnamediv> <refsect1> <title>Description</title> - <methodsynopsis> - <type>mixed</type><methodname>mysqli_stmt_affected_rows</methodname> - <methodparam><type>object</type><parameter>stmt</parameter></methodparam> - </methodsynopsis> - - &warn.undocumented.func; - + <para>Procedural style :</para> + <methodsynopsis> + <type>mixed</type><methodname>mysqli_stmt_affected_rows</methodname> + <methodparam><type>object</type><parameter>stmt</parameter></methodparam> + </methodsynopsis> + <para>Object oriented style (property):</para> + <classsynopsis> + <ooclass><classname>stmt</classname></ooclass> + <fieldsynopsis><type>mixed</type><varname>affected_rows</varname></fieldsynopsis> + </classsynopsis> + <para> + <function>mysqli_stmt_affected_rows</function> returns the number of rows affected + by INSERT, UPDATE, or DELETE query. If the last query was invalid, this function will return -1. + </para> + <note> + <para> + For SELECT statements <function>mysqli_affected_rows</function> works like + <function>mysqli_num_rows</function>. + </para> + </note> + <para> + The <function>mysqli_stmt_affected_rows</function> function only works with queries + which update a table. In order to return the number of rows from a SELECT query, use + the <function>mysqli_stmt_num_rows</function> function instead. + </para> + </refsect1> + <refsect1> + <title>Return Values</title> + <para> + An integer greater than zero indicates the number of rows affected or retrieved. + Zero indicates that no records where updated for an UPDATE/DELETE statement, no + rows matched the WHERE clause in the query or that no query has yet been executed. + -1 indicates that the query has returned an error. + </para> + <note> + <para> + If the number of affected rows is greater than maximal PHP int value, the number of + affected rows will be returned as a string value. + </para> + </note> + </refsect1> + <refsect1> + <title>See also</title> + <para> + <function>mysqli_stmt_num_rows</function>, + <function>mysqli_prepare</function> + </para> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc/en/reference/mysqli/functions/mysqli-stmt-close.xml?r1=1.2&r2=1.3&ty=u Index: phpdoc/en/reference/mysqli/functions/mysqli-stmt-close.xml diff -u phpdoc/en/reference/mysqli/functions/mysqli-stmt-close.xml:1.2 phpdoc/en/reference/mysqli/functions/mysqli-stmt-close.xml:1.3 --- phpdoc/en/reference/mysqli/functions/mysqli-stmt-close.xml:1.2 Sun May 25 14:02:46 2003 +++ phpdoc/en/reference/mysqli/functions/mysqli-stmt-close.xml Wed Jan 28 18:18:42 2004 @@ -1,19 +1,44 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.2 $ --> +<!-- $Revision: 1.3 $ --> <refentry id="function.mysqli-stmt-close"> <refnamediv> <refname>mysqli_stmt_close</refname> - <refpurpose>close statement</refpurpose> + <refname>mysqli_stmt->close</refname> + <refpurpose>Closes a prepared statement</refpurpose> </refnamediv> <refsect1> <title>Description</title> + <para>Procedural style:</para> + <methodsynopsis> + <type>bool</type><methodname>mysqli_stmt_close</methodname> + <methodparam><type>object</type><parameter>stmt</parameter></methodparam> + </methodsynopsis> + <para>Object oriented style (method):</para> + <classsynopsis> + <ooclass><classname>mysqli_stmt</classname></ooclass> <methodsynopsis> - <type>bool</type><methodname>mysqli_stmt_close</methodname> - <methodparam><type>resource</type><parameter>stmt</parameter></methodparam> - </methodsynopsis> - - &warn.undocumented.func; - + <type>bool</type><methodname>mysqli_stmt->close</methodname> + <methodparam><type>void</type><parameter></parameter></methodparam> + </methodsynopsis> + </classsynopsis> + <para> + Closes a prepared statement. <function>mysql_stmt_close</function> also deallocates the + statement handle pointed to by stmt. + If the current statement has pending or unread results, this function cancels them so that + the next query can be executed. + </para> + </refsect1> + <refsect1> + <title>Return values</title> + <para>&return.success;</para> + </refsect1> + <refsect1> + <title>See also</title> + <para> + <function>mysqli_stmt_num_rows</function>, + <function>mysqli_prepare</function>, + <function>mysqli_execute</function> + </para> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc/en/reference/mysqli/functions/mysqli-stmt-errno.xml?r1=1.2&r2=1.3&ty=u Index: phpdoc/en/reference/mysqli/functions/mysqli-stmt-errno.xml diff -u phpdoc/en/reference/mysqli/functions/mysqli-stmt-errno.xml:1.2 phpdoc/en/reference/mysqli/functions/mysqli-stmt-errno.xml:1.3 --- phpdoc/en/reference/mysqli/functions/mysqli-stmt-errno.xml:1.2 Sun May 25 14:02:46 2003 +++ phpdoc/en/reference/mysqli/functions/mysqli-stmt-errno.xml Wed Jan 28 18:18:42 2004 @@ -1,19 +1,48 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.2 $ --> +<!-- $Revision: 1.3 $ --> <refentry id="function.mysqli-stmt-errno"> <refnamediv> <refname>mysqli_stmt_errno</refname> - <refpurpose></refpurpose> + <refname>mysqli_stmt->errno</refname> + <refpurpose>Returns the error code for the most recent statement call</refpurpose> </refnamediv> <refsect1> <title>Description</title> - <methodsynopsis> - <type>int</type><methodname>mysqli_stmt_errno</methodname> - <methodparam><type>resource</type><parameter>stmt</parameter></methodparam> - </methodsynopsis> - - &warn.undocumented.func; - + <para>Procedural style :</para> + <methodsynopsis> + <type>int</type><methodname>mysqli_stmt_errno</methodname> + <methodparam><type>object</type><parameter>stmt</parameter></methodparam> + </methodsynopsis> + <para>Object oriented style (property):</para> + <classsynopsis> + <ooclass><classname>stmt</classname></ooclass> + <fieldsynopsis><type>int</type><varname>errno</varname></fieldsynopsis> + </classsynopsis> + <para> + For the statement specified by <literal>stmt</literal>, <function>mysqli_stmt_errno()</function> + returns the error code for the most recently invoked statement function that can succeed or fail. + </para> + <note> + <para> + Client error message numbers are listed in the MySQL <filename>errmsg.h</filename> header file, + server error message numbers are listed in <filename>mysqld_error.h</filename>. + In the MySQL source distribution you can find a complete list of error messages and error numbers + in the file <filename>Docs/mysqld_error.txt</filename>. + </para> + </note> + </refsect1> + <refsect1> + <title>Return values</title> + <para> + An error code value. Zero means no error occurred. + </para> + </refsect1> + <refsect1> + <title>See also</title> + <para> + <function>mysqli_stmt_error</function>, + <function>mysqli_stmt_sqlstate</function> + </para> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc/en/reference/mysqli/functions/mysqli-stmt-error.xml?r1=1.2&r2=1.3&ty=u Index: phpdoc/en/reference/mysqli/functions/mysqli-stmt-error.xml diff -u phpdoc/en/reference/mysqli/functions/mysqli-stmt-error.xml:1.2 phpdoc/en/reference/mysqli/functions/mysqli-stmt-error.xml:1.3 --- phpdoc/en/reference/mysqli/functions/mysqli-stmt-error.xml:1.2 Sun May 25 14:02:46 2003 +++ phpdoc/en/reference/mysqli/functions/mysqli-stmt-error.xml Wed Jan 28 18:18:42 2004 @@ -1,20 +1,43 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.2 $ --> +<!-- $Revision: 1.3 $ --> <refentry id="function.mysqli-stmt-error"> <refnamediv> <refname>mysqli_stmt_error</refname> - <refpurpose></refpurpose> + <refname>mysqli_stmt->error</refname> + <refpurpose>Returns a string description for last statement error</refpurpose> </refnamediv> <refsect1> <title>Description</title> - <methodsynopsis> - <type>string</type><methodname>mysqli_stmt_error</methodname> - <methodparam><type>resource</type><parameter>stmt</parameter></methodparam> - </methodsynopsis> - - &warn.undocumented.func; - + <para>Procedural style:</para> + <methodsynopsis> + <type>string</type><methodname>mysqli_stmt_error</methodname> + <methodparam><type>object</type><parameter>stmt</parameter></methodparam> + </methodsynopsis> + <para>Object oriented style (property):</para> + <classsynopsis> + <ooclass><classname>stmt</classname></ooclass> + <fieldsynopsis><type>string</type><varname>error</varname></fieldsynopsis> + </classsynopsis> + <para> + For the statement specified by <literal>stmt</literal>, <function>mysql_stmt_error</function> + returns a containing the error message for the most recently invoked statement function that + can succeed or fail. + </para> + </refsect1> + <refsect1> + <title>Return values</title> + <para> + A string that describes the error. An empty string if no error occurred. + </para> </refsect1> + <refsect1> + <title>See also</title> + <para> + <function>mysqli_stmt_errno</function>, + <function>mysqli_stmt_sqlstate</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-stmt-store-result.xml?r1=1.1&r2=1.2&ty=u Index: phpdoc/en/reference/mysqli/functions/mysqli-stmt-store-result.xml diff -u phpdoc/en/reference/mysqli/functions/mysqli-stmt-store-result.xml:1.1 phpdoc/en/reference/mysqli/functions/mysqli-stmt-store-result.xml:1.2 --- phpdoc/en/reference/mysqli/functions/mysqli-stmt-store-result.xml:1.1 Sun May 25 16:48:07 2003 +++ phpdoc/en/reference/mysqli/functions/mysqli-stmt-store-result.xml Wed Jan 28 18:18:42 2004 @@ -1,19 +1,52 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.1 $ --> +<!-- $Revision: 1.2 $ --> <refentry id="function.mysqli-stmt-store-result"> <refnamediv> <refname>mysqli_stmt_store_result</refname> - <refpurpose></refpurpose> + <refname>mysqli_stmt->store_result</refname> + <refpurpose>Transfers a result set from a prepared statement</refpurpose> </refnamediv> <refsect1> <title>Description</title> + <para>Procedural style:</para> + <methodsynopsis> + <type>bool</type><methodname>mysqli_stmt_store_result</methodname> + <methodparam><type>object</type><parameter>stmt</parameter></methodparam> + </methodsynopsis> + <para>Object oriented style (method):</para> + <classsynopsis> + <ooclass><classname>mysqli_stmt</classname></ooclass> <methodsynopsis> - <type>resource</type><methodname>mysqli_stmt_store_result</methodname> - <methodparam><type>resource</type><parameter>stmt</parameter></methodparam> + <type>bool</type><methodname>store_result</methodname> + <methodparam><type>void</type><parameter></parameter></methodparam> </methodsynopsis> - - &warn.undocumented.func; - + </classsynopsis> + <para> + You must call <function>mysql_stmt_store_result</function> for every query that + successfully produces a result set (<literal>SELECT, SHOW, DESCRIBE, EXPLAIN</literal>), + and only if you want to buffer the complete result set by the client, + so that the subsequent <function>mysql_fetch</function> call returns buffered data. + </para> + <note> + <para> + It is unnecessary to call <function>mysql_stmt_store_result()</function> for other queries, + but if you do, it will not harm or cause any notable performance in all cases. + You can detect whether the query produced a result set by checking if + <function>mysql_get_metadata</function> returns NULL. + </para> + </note> + </refsect1> + <refsect1> + <title>Return values</title> + <para>&return.success;</para> + </refsect1> + <refsect1> + <title>See also</title> + <para> + <function>mysqli_prepare</function>, + <function>mysqli_get_metadata</function>, + <function>mysqli_fetch</function> + </para> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc/en/reference/mysqli/functions/mysqli-store-result.xml?r1=1.4&r2=1.5&ty=u Index: phpdoc/en/reference/mysqli/functions/mysqli-store-result.xml diff -u phpdoc/en/reference/mysqli/functions/mysqli-store-result.xml:1.4 phpdoc/en/reference/mysqli/functions/mysqli-store-result.xml:1.5 --- phpdoc/en/reference/mysqli/functions/mysqli-store-result.xml:1.4 Thu Dec 18 09:14:31 2003 +++ phpdoc/en/reference/mysqli/functions/mysqli-store-result.xml Wed Jan 28 18:18:42 2004 @@ -1,16 +1,27 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.4 $ --> +<!-- $Revision: 1.5 $ --> <refentry id="function.mysqli-store-result"> <refnamediv> <refname>mysqli_store_result</refname> + <refname>mysqli->store_result</refname> <refpurpose>Transfers a result set from the last query</refpurpose> </refnamediv> <refsect1> <title>Description</title> + <para>Procedural style:</para> + <methodsynopsis> + <type>object</type><methodname>mysqli_store_result</methodname> + <methodparam><type>object</type><parameter>link</parameter></methodparam> + </methodsynopsis> + <para>Object oriented style (method):</para> + <classsynopsis> + <ooclass><classname>mysqli</classname></ooclass> <methodsynopsis> - <type>resource</type><methodname>mysqli_store_result</methodname> - <methodparam><type>resource</type><parameter>link</parameter></methodparam> + <type>object</type> + <methodname>store_result</methodname> + <methodparam><type>void</type><parameter></parameter></methodparam> </methodsynopsis> + </classsynopsis> <para> Transfers the result set from the last query on the database connection represented by the <parameter>link</parameter> parameter to be used with @@ -20,10 +31,39 @@ <para> Although it is always good practice to free the memory used by the result of a query using the <function>mysqli_free_result</function> function, when - transferring large result sets using the <function>mysqli_store_result</function> + transfering large result sets using the <function>mysqli_store_result</function> this becomes particularly important. </para> </note> + <note> + <para> + <function>mysqli_store_result</function> returns &false; in case the query + didn't return a result set (if the query was, for example an INSERT + statement). This function also returns &false; if the reading of the + result set failed. You can check if you have got an error by checking + if <function>mysqli_error</function> doesn't return an empty string, if + <function>mysqli_errno</function> returns a non zero value, or if + <function>mysqli_field_count</function> returns a non zero value. + Also possible reason for this function returning &false; after + successfull call to <function>mysqli_query</function> can be too large + result set (memory for it cannot be allocated). If + <function>mysqli_field_count</function> returns a non-zero value, the + statement should have produced a non-empty result set. + </para> + </note> + </refsect1> + <refsect1> + <title>Return values</title> + <para> + Returns a buffered result object or &false; if an error occured. + </para> + </refsect1> + <refsect1> + <title>See also</title> + <para> + <function>mysqli_real_query</function>, + <function>mysqli_use_result</function>. + </para> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc/en/reference/mysqli/functions/mysqli-thread-id.xml?r1=1.3&r2=1.4&ty=u Index: phpdoc/en/reference/mysqli/functions/mysqli-thread-id.xml diff -u phpdoc/en/reference/mysqli/functions/mysqli-thread-id.xml:1.3 phpdoc/en/reference/mysqli/functions/mysqli-thread-id.xml:1.4 --- phpdoc/en/reference/mysqli/functions/mysqli-thread-id.xml:1.3 Sun May 25 15:09:28 2003 +++ phpdoc/en/reference/mysqli/functions/mysqli-thread-id.xml Wed Jan 28 18:18:42 2004 @@ -1,20 +1,29 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.3 $ --> +<!-- $Revision: 1.4 $ --> <refentry id="function.mysqli-thread-id"> <refnamediv> <refname>mysqli_thread_id</refname> + <refname>mysqli->thread_id</refname> <refpurpose>Returns the thread ID for the current connection</refpurpose> </refnamediv> <refsect1> <title>Description</title> - <methodsynopsis> - <type>int</type><methodname>mysqli_thread_id</methodname> - <methodparam><type>resource</type><parameter>link</parameter></methodparam> - </methodsynopsis> + <para>Procedural style:</para> + <methodsynopsis> + <type>int</type><methodname>mysqli_thread_id</methodname> + <methodparam><type>object</type><parameter>link</parameter></methodparam> + </methodsynopsis> + <para>Object oriented style (property):</para> + <classsynopsis> + <ooclass><classname>mysqli</classname></ooclass> + <fieldsynopsis><type>int</type><varname>thread_id</varname></fieldsynopsis> + </classsynopsis> <para> The <function>mysqli_thread_id</function> function returns the thread ID for the current connection which can then be killed using the - <function>mysqli_kill</function> function. + <function>mysqli_kill</function> function. If the connection is lost + and you reconnect with <function>mysqli_ping</function>, the thread ID + will be other. Therefore you should get the thread ID only when you need it. </para> <note> <para> @@ -22,8 +31,23 @@ if the connection is broken and then re-established a new thread ID will be assigned. </para> + <para> + To kill a running query you can use the SQL command <literal>KILL QUERY processid]</literal>. + </para> </note> </refsect1> + <refsect1> + <title>Return values</title> + <para> + <function>mysqli_thread_id</function> returns the Thread ID for the current connection. + </para> + </refsect1> + <refsect1> + <title>See also</title> + <para> + <function>mysqli_kill</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-thread-safe.xml?r1=1.2&r2=1.3&ty=u Index: phpdoc/en/reference/mysqli/functions/mysqli-thread-safe.xml diff -u phpdoc/en/reference/mysqli/functions/mysqli-thread-safe.xml:1.2 phpdoc/en/reference/mysqli/functions/mysqli-thread-safe.xml:1.3 --- phpdoc/en/reference/mysqli/functions/mysqli-thread-safe.xml:1.2 Sat May 24 02:44:21 2003 +++ phpdoc/en/reference/mysqli/functions/mysqli-thread-safe.xml Wed Jan 28 18:18:42 2004 @@ -1,21 +1,27 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.2 $ --> +<!-- $Revision: 1.3 $ --> <refentry id="function.mysqli-thread-safe"> <refnamediv> <refname>mysqli_thread_safe</refname> - <refpurpose> - Returns whether thread safety is given or not - </refpurpose> + <refpurpose>Returns whether thread safety is given or not</refpurpose> </refnamediv> <refsect1> <title>Description</title> - <methodsynopsis> - <type>bool</type><methodname>mysqli_thread_safe</methodname> - <methodparam><type>void</type><parameter></parameter></methodparam> - </methodsynopsis> - - &warn.undocumented.func; - + <para>Procedural style:</para> + <methodsynopsis> + <type>bool</type><methodname>mysqli_thread_safe</methodname> + <methodparam><type>void</type><parameter></parameter></methodparam> + </methodsynopsis> + <para> + <function>mysqli_thread_safe</function> indicates whether the + client library is compiled as thread-safe. + </para> + </refsect1> + <refsect1> + <title>Return values</title> + <para> + &true; if the client library is thread-safe, otherwise &false;. + </para> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc/en/reference/mysqli/functions/mysqli-use-result.xml?r1=1.5&r2=1.6&ty=u Index: phpdoc/en/reference/mysqli/functions/mysqli-use-result.xml diff -u phpdoc/en/reference/mysqli/functions/mysqli-use-result.xml:1.5 phpdoc/en/reference/mysqli/functions/mysqli-use-result.xml:1.6 --- phpdoc/en/reference/mysqli/functions/mysqli-use-result.xml:1.5 Tue Jun 10 13:18:06 2003 +++ phpdoc/en/reference/mysqli/functions/mysqli-use-result.xml Wed Jan 28 18:18:42 2004 @@ -1,16 +1,27 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.5 $ --> +<!-- $Revision: 1.6 $ --> <refentry id="function.mysqli-use-result"> <refnamediv> <refname>mysqli_use_result</refname> + <refname>mysqli->use_result</refname> <refpurpose>Initiate a result set retrieval</refpurpose> </refnamediv> <refsect1> <title>Description</title> + <para>Procedural style:</para> + <methodsynopsis> + <type>mixed</type><methodname>mysqli_use_result</methodname> + <methodparam><type>object</type><parameter>link</parameter></methodparam> + </methodsynopsis> + <para>Object oriented style (method):</para> + <classsynopsis> + <ooclass><classname>mysqli</classname></ooclass> <methodsynopsis> - <type>resource</type><methodname>mysqli_use_result</methodname> - <methodparam><type>resource</type><parameter>link</parameter></methodparam> + <type>mixed</type> + <methodname>use_result</methodname> + <methodparam><type>void</type><parameter></parameter></methodparam> </methodsynopsis> + </classsynopsis> <para> <function>mysqli_use_result</function> is used to initiate the retrieval of a result set from the last query executed using the @@ -26,12 +37,24 @@ the entire result set from the database and hence cannot be used functions such as <function>mysqli_data_seek</function> to move to a particular row within the set. To use this functionality, the result set must be - stored using <function>mysqli_store_result</function> + stored using <function>mysqli_store_result</function>. One should not + use <function>mysqli_use_result</function> if a lot of processing on + the client side is performed, since this will tie up the server and + prevent other threads from updating any tables from which the data is + being fetched. </para> </note> + </refsect1> + <refsect1> + <title>Return values</title> + <para> + Returns an unbuffered result object or &false; if an error occured. + </para> + </refsect1> + <refsect1> + <title>See also</title> <para> - See also - <function>mysqli_real_query</function> and + <function>mysqli_real_query</function>, <function>mysqli_store_result</function>. </para> </refsect1> http://cvs.php.net/diff.php/phpdoc/en/reference/mysqli/functions/mysqli-warning-count.xml?r1=1.3&r2=1.4&ty=u Index: phpdoc/en/reference/mysqli/functions/mysqli-warning-count.xml diff -u phpdoc/en/reference/mysqli/functions/mysqli-warning-count.xml:1.3 phpdoc/en/reference/mysqli/functions/mysqli-warning-count.xml:1.4 --- phpdoc/en/reference/mysqli/functions/mysqli-warning-count.xml:1.3 Tue Jun 10 13:18:06 2003 +++ phpdoc/en/reference/mysqli/functions/mysqli-warning-count.xml Wed Jan 28 18:18:42 2004 @@ -1,23 +1,48 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.3 $ --> +<!-- $Revision: 1.4 $ --> <refentry id="function.mysqli-warning-count"> <refnamediv> <refname>mysqli_warning_count</refname> - <refpurpose> - Returns the number of warnings from the last query for the given link - </refpurpose> + <refname>mysqli->warning_count</refname> + <refpurpose>Returns the number of warnings from the last query for the given link</refpurpose> </refnamediv> <refsect1> <title>Description</title> - <methodsynopsis> - <type>resource</type><methodname>mysqli_warning_count</methodname> - <methodparam><type>resource</type><parameter>link</parameter></methodparam> - </methodsynopsis> + <para>Procedural style:</para> + <methodsynopsis> + <type>int</type><methodname>mysqli_warning_count</methodname> + <methodparam><type>object</type><parameter>link</parameter></methodparam> + </methodsynopsis> + <para>Object oriented style (property):</para> + <classsynopsis> + <ooclass><classname>mysqli</classname></ooclass> + <fieldsynopsis><type>int</type><varname>warning_count</varname></fieldsynopsis> + </classsynopsis> <para> <function>mysqli_warning_count</function> returns the number of warnings from the last query in the connection represented by the <parameter>link</parameter> parameter. </para> + <note> + <para> + For retrieving warning messages you can use the SQL command + <literal>SHOW WARNINGS [limit row_count]</literal>. + </para> + </note> + </refsect1> + <refsect1> + <title>Return values</title> + <para> + Number of warnings or zero if there are no warnings. + </para> + </refsect1> + <refsect1> + <title>See also</title> + <para> + <function>mysqli_errno</function>, + <function>mysqli_error</function>, + <function>mysqli_sqlstate</function> + </para> </refsect1> </refentry>
http://cvs.php.net/diff.php/phpdoc/en/reference/mysqli/functions/mysqli-affected-rows.xml?r1=1.11&r2=1.12&ty=u Index: phpdoc/en/reference/mysqli/functions/mysqli-affected-rows.xml diff -u phpdoc/en/reference/mysqli/functions/mysqli-affected-rows.xml:1.11 phpdoc/en/reference/mysqli/functions/mysqli-affected-rows.xml:1.12 --- phpdoc/en/reference/mysqli/functions/mysqli-affected-rows.xml:1.11 Mon Dec 15 11:52:08 2003 +++ phpdoc/en/reference/mysqli/functions/mysqli-affected-rows.xml Wed Jan 28 18:18:42 2004 @@ -1,139 +1,135 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.11 $ --> +<!-- $Revision: 1.12 $ --> <refentry id="function.mysqli-affected-rows"> - <refnamediv> - <refname>mysqli_affected_rows</refname> - <refpurpose>Gets the number of affected rows in a previous MySQL operation</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <methodsynopsis> - <type>mixed</type><methodname>mysqli_affected_rows</methodname> - <methodparam><type>object</type><parameter>link</parameter></methodparam> - </methodsynopsis> - <para> - <function>mysqli_affected_rows</function> returns the number of rows affected by the last - INSERT, UPDATE, or DELETE query associated with the provided <parameter>link</parameter> - parameter. If the last query was invalid, this function will return -1. - </para> - <note> - <para> - When deleting the entire contents of a table (i.e. 'DELETE FROM foo'), this function will - not return the number of rows that were actually deleted. - </para> - </note> - <para> - The <function>mysqli_affected_rows</function> function only works with queries which modify - a table. In order to return the number of rows from a SELECT query, use the - <function>mysqli_num_rows</function> function instead. - </para> - <para> - <example> - <title>Delete-Query</title> - <para>Procedural style:</para> - <programlisting role="php"> -<![CDATA[ -<?php - /* connect to database */ - $link = mysqli_connect("localhost", "mysql_user", "mysql_password", "mydb") or - die("Could not connect: " . mysqli_connect_error()); - - /* this should return the correct numbers of deleted records */ - mysqli_query($link, "DELETE FROM mytable WHERE id < 10"); - printf("Records deleted: %2d\n", mysqli_affected_rows($link)); - - /* without a where clause in a delete statement, it should return 0 */ - mysqli_query($link, "DELETE FROM mytable"); - printf("Records deleted: %2d\n", mysqli_affected_rows($link)); - - /* close connection */ - mysqli_close($link); -?> -]]> - </programlisting> - <para>Object oriented style:</para> - <programlisting role="php"> -<![CDATA[ -<?php - /* connect to database */ - $mysql = mysqli_connect("localhost", "mysql_user", "mysql_password", "mydb") or - die("Could not connect: " . mysqli_connect_error()); - - /* this should return the correct numbers of deleted records */ - $mysql->query("DELETE FROM mytable WHERE id < 10"); - printf ("Records deleted: %2d\n", $mysql->affected_rows()); - - /* without a where clause in a delete statement, it should return 0 */ - $mysql->query("DELETE FROM mytable"); - printf ("Records deleted: %2d\n", $mysql->affected_rows()); - - /* close connection */ - $mysql->close(); -?> -]]> - </programlisting> - <para> - The above examples would produce the following output: - <screen> -<![CDATA[ -Records deleted: 10 -Records deleted: 0 -]]> - </screen> - </para> - </example> - <example> - <title>Update-Query</title> - <para>Procedural style:</para> - <programlisting role="php"> -<![CDATA[ -<?php - /* connect to database */ - $link = mysqli_connect("localhost", "mysql_user", "mysql_password", "mydb") or - die("Could not connect: " . mysqli_connect_error()); - - /* Update records */ - mysqli_query($link, "UPDATE mytable SET used=1 WHERE id < 10"); - printf ("Updated records: %d\n", mysqli_affected_rows($link)); - - /* close connection */ - mysqli_close($link); -?> -]]> - </programlisting> - <para>Object oriented style:</para> - <programlisting role="php"> -<![CDATA[ -<?php - /* connect to database */ - $mysql = mysqli_connect("localhost", "mysql_user", "mysql_password", "mydb") or - die("Could not connect: " . mysqli_connect_error()); - - /* Update records */ - $mysql->query("UPDATE mytable SET used=1 WHERE id < 10"); - printf ("Updated records: %d\n", $mysql->affected_rows($link)); - - /* close connection */ - $mysql->close($link); -?> -]]> - </programlisting> - <para> - The above examples would produce the following output: - <screen> -<![CDATA[ -Updated Records: 10 -]]> - </screen> - </para> - </example> - </para> - <para> - See also: <function>mysqli_num_rows</function>, - <function>mysqli_info</function>. - </para> - </refsect1> - </refentry> + <refnamediv> + <refname>mysqli_affected_rows</refname> + <refname>mysqli->affected_rows</refname> + <refpurpose>Gets the number of affected rows in a previous MySQL operation</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <para>Procedural style:</para> + <methodsynopsis> + <type>mixed</type><methodname>mysqli_affected_rows</methodname> + <methodparam><type>object</type><parameter>link</parameter></methodparam> + </methodsynopsis> + <para>Object oriented style (property):</para> + <classsynopsis> + <ooclass><classname>mysqli</classname></ooclass> + <fieldsynopsis><type>mixed</type><varname>affected_rows</varname></fieldsynopsis> + </classsynopsis> + <para> + <function>mysqli_affected_rows</function> returns the number of rows affected by the last + INSERT, UPDATE, or DELETE query associated with the provided <parameter>link</parameter> + parameter. If the last query was invalid, this function will return -1. + </para> + <note> + <para> + For SELECT statements <function>mysqli_affected_rows</function> works like + <function>mysqli_num_rows</function>. + </para> + </note> + <para> + The <function>mysqli_affected_rows</function> function only works with queries which modify + a table. In order to return the number of rows from a SELECT query, use the + <function>mysqli_num_rows</function> function instead. + </para> + </refsect1> + <refsect1> + <title>Return Values</title> + <para> + An integer greater than zero indicates the number of rows affected or retrieved. + Zero indicates that no records where updated for an UPDATE statement, no rows matched + the WHERE clause in the query or that no query has yet been executed. + -1 indicates that the query returned an error. + </para> + <note> + <para> + If the number of affected rows is greater than maximal int value, the number of affected rows + will be returned as a string. + </para> + </note> + </refsect1> + <refsect1> + <title>Example</title> + <para> + <example> + <title>Example for affected rows</title> + <programlisting role="php"> + <![CDATA[ + <?php + /* + +-----------------------------------------------------------+ + | file: mysqli_affected_rows.php | + +-----------------------------------------------------------+ + | modifies some datasets and returns number of affected | + | rows | + +-----------------------------------------------------------+ + */ + + /* ---- Procedural style ---- */ + $link = mysqli_connect("localhost", "my_user", "my_password", "test") + or die("Can't connect to MySQL server on localhost"); + + /* create table and insert some data */ + mysqli_query($link, "DROP TABLE IF EXISTS affected_rows"); + mysqli_query($link, "CREATE TABLE affected_rows (a int)"); + mysqli_query($link, "INSERT INTO affected_rows VALUES (1),(2),(3),(4)"); + + /* update values and retrieve number of affected rows */ + mysqli_query($link, "UPDATE affected_rows SET a=5 WHERE a=1"); + printf("Affected rows (update): %d\n", mysqli_affected_rows($link)); + + /* delete rows and retrieve number of affected_rows */ + mysqli_query($link, "DELETE FROM affected_rows WHERE a < 4"); + printf("Affected rows (delete): %d\n", mysqli_affected_rows($link)); + + /* select all rows and retrieve number of affected_rows */ + mysqli_query($link, "SELECT a FROM affected_rows"); + printf("Affected rows (select): %d\n", mysqli_affected_rows($link)); + + mysqli_close($link); + + /* ---- Object oriented style ----*/ + $mysqli = new mysqli("localhost", "my_user", "my_password", "test"); + + if (mysqli_connect_errno()) { + printf("Connect failed: %s\n", mysqli_connect_error()); + exit(); + } + + /* create table and insert some data */ + $mysqli->query("DROP TABLE IF EXISTS affected_rows"); + $mysqli->query("CREATE TABLE affected_rows (a int)"); + $mysqli->query("INSERT INTO affected_rows VALUES (1),(2),(3),(4)"); + + /* update values and retrieve number of affected rows */ + $mysqli->query("UPDATE affected_rows SET a=5 WHERE a=1"); + printf("Affected rows (update): %d\n", $mysqli->affected_rows); + + /* delete rows and retrieve number of affected_rows */ + $mysqli->query("DELETE FROM affected_rows WHERE a < 4"); + printf("Affected rows (delete): %d\n", $mysqli->affected_rows); + + /* select all rows and retrieve number of affected_rows */ + $mysqli->query("SELECT a FROM affected_rows"); + printf("Affected rows (select): %d\n", $mysqli->affected_rows); + + $mysqli->close(); + ?> + ]]> + </programlisting> + </example> + </para> + </refsect1> + <refsect1> + <title>See also</title> + <para> + <function>mysqli_num_rows</function>, + <function>mysqli_info</function>. + </para> + </refsect1> +</refentry> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/diff.php/phpdoc/en/reference/mysqli/functions/mysqli-autocommit.xml?r1=1.10&r2=1.11&ty=u Index: phpdoc/en/reference/mysqli/functions/mysqli-autocommit.xml diff -u phpdoc/en/reference/mysqli/functions/mysqli-autocommit.xml:1.10 phpdoc/en/reference/mysqli/functions/mysqli-autocommit.xml:1.11 --- phpdoc/en/reference/mysqli/functions/mysqli-autocommit.xml:1.10 Thu Dec 18 09:14:31 2003 +++ phpdoc/en/reference/mysqli/functions/mysqli-autocommit.xml Wed Jan 28 18:18:42 2004 @@ -1,24 +1,32 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.10 $ --> +<!-- $Revision: 1.11 $ --> <refentry id="function.mysqli-autocommit"> <refnamediv> <refname>mysqli_autocommit</refname> - <refpurpose>Turns on or off auto-committing database modifications</refpurpose> + <refname> mysqli->auto_commit</refname> + <refpurpose>Turns on or off auto-commiting database modifications</refpurpose> </refnamediv> <refsect1> <title>Description</title> + <para>Procedural style:</para> + <methodsynopsis> + <type>bool</type><methodname>mysqli_autocommit</methodname> + <methodparam><type>object</type><parameter>link</parameter></methodparam> + <methodparam><type>bool</type><parameter>mode</parameter></methodparam> + </methodsynopsis> + <para>Object oriented style (method)</para> + <classsynopsis> + <ooclass><classname>mysqli</classname></ooclass> <methodsynopsis> - <type>bool</type><methodname>mysqli_autocommit</methodname> - <methodparam><type>object</type><parameter>link</parameter></methodparam> + <type>bool</type> + <methodname>auto_commit</methodname> <methodparam><type>bool</type><parameter>mode</parameter></methodparam> - </methodsynopsis> + </methodsynopsis> + </classsynopsis> <para> <function>mysqli_autocommit</function> is used to turn on or off auto-commit mode on queries for the database connection represented by the <parameter>link</parameter> - resource. - </para> - <para> - &return.success; + object. </para> <note> <para> @@ -30,67 +38,75 @@ 'SELECT @@autocommit'. </para> </note> + </refsect1> + <refsect1> + <title>Return values</title> + <para> + &return.success; + </para> + </refsect1> + <refsect1> + <title>Example</title> <para> <example> <title>Using the mysqli_autocommit function</title> - <para>Procedural style:</para> <programlisting role="php"> <![CDATA[ <?php +/* + +-----------------------------------------------------------+ + | file: mysqli_autocommit.php | + +-----------------------------------------------------------+ + | connects to MySQL server on localhost, turns autocommit | + | on and retrieves autocommit variable | + +-----------------------------------------------------------+ +*/ + + /* ---- Procedural style ---- */ + $link = mysqli_connect("localhost", "my_user", "my_password", "test") + or die("Can't connect to MySQL server on localhost"); + + /* turn autocommit on */ + mysqli_autocommit($link, TRUE); + + if ($result = mysqli_query($link, "SELECT @@autocommit")) { + $row = mysqli_fetch_row($result); + printf("Autocommit is %s\n", $row[0]); + mysqli_free_result($result); + } + + mysqli_close($link); + + /* ---- Object oriented style ----*/ + $mysqli = new mysqli("localhost", "my_user", "my_password", "test"); + + if (mysqli_connect_errno()) { + printf("Connect failed: %s\n", mysqli_connect_error()); + exit(); + } + + /* turn autocommit on */ + $mysqli->autocommit(TRUE); + + if ($result = $mysqli->query("SELECT @@autocommit")) { + $row = $result->fetch_row(); + printf("Autocommit is %s\n", $row[0]); + $result->free(); + } - /* Open a connection */ - $link = mysqli_connect("localhost", "user", "pass", "mydb"); - - /* Turn on autocommit */ - mysqli_autocommit($link, true); - - /* determine current autocommit status */ - if ($result = mysqli_query($link, "SELECT @@autocommit")) { - $row = mysqli_fetch_row($result); - mysqli_free_result($result); - printf("Autocommit is %d\n", $row[0]); - } - - /* close connection */ - mysqli_close($link); + $mysqli->close(); ?> -]]> - </programlisting> - <para>Object oriented style:</para> - <programlisting role="php"> -<![CDATA[ -<?php - /* Open a connection */ - $mysql = mysqli_connect("localhost", "user", "pass", "mydb"); - - /* Turn on autocommit */ - $mysql->autocommit(true); - - /* determine current autocommit status */ - if ($result = $mysql->query($link, "SELECT @@autocommit")) { - $row = $result->fetch_row($result); - printf ("Autocommit is %d\n", $row[0]); - $result->free(); - } - - /* close connection */ - $mysql->close(); ?> ]]> </programlisting> - <para> - The above examples would produce the following output: - <screen> -<![CDATA[ -Autocommit is 1 -]]> - </screen> - </para> </example> </para> + </refsect1> + <refsect1> + <title>See also</title> <para> - See also <function>mysqli_commit</function>, + <function>mysqli_commit</function>, <function>mysqli_rollback</function>. </para> </refsect1> http://cvs.php.net/diff.php/phpdoc/en/reference/mysqli/functions/mysqli-bind-param.xml?r1=1.3&r2=1.4&ty=u Index: phpdoc/en/reference/mysqli/functions/mysqli-bind-param.xml diff -u phpdoc/en/reference/mysqli/functions/mysqli-bind-param.xml:1.3 phpdoc/en/reference/mysqli/functions/mysqli-bind-param.xml:1.4 --- phpdoc/en/reference/mysqli/functions/mysqli-bind-param.xml:1.3 Thu Dec 11 10:42:02 2003 +++ phpdoc/en/reference/mysqli/functions/mysqli-bind-param.xml Wed Jan 28 18:18:42 2004 @@ -1,19 +1,32 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.3 $ --> +<!-- $Revision: 1.4 $ --> <refentry id="function.mysqli-bind-param"> <refnamediv> <refname>mysqli_bind_param</refname> + <refname>stmt->bind_param</refname> <refpurpose>Binds variables to a prepared statement as parameters</refpurpose> </refnamediv> <refsect1> <title>Description</title> + <para>Procedural style:</para> + <methodsynopsis> + <type>bool</type><methodname>mysqli_bind_param</methodname> + <methodparam><type>object</type><parameter>stmt</parameter></methodparam> + <methodparam><type>array</type><parameter>types</parameter></methodparam> + <methodparam><type>mixed</type><parameter>var1</parameter></methodparam> + <methodparam choice="opt"><type>mixed</type><parameter>var2, ...</parameter></methodparam> + </methodsynopsis> + <para>Object oriented style (method):</para> + <classsynopsis> + <ooclass><classname>stmt</classname></ooclass> <methodsynopsis> - <type>bool</type><methodname>mysqli_bind_param</methodname> - <methodparam><type>object</type><parameter>stmt</parameter></methodparam> + <type>bool</type> + <methodname>bind_param</methodname> <methodparam><type>array</type><parameter>types</parameter></methodparam> <methodparam><type>mixed</type><parameter>var1</parameter></methodparam> <methodparam choice="opt"><type>mixed</type><parameter>var2, ...</parameter></methodparam> </methodsynopsis> + </classsynopsis> <para> <function>mysql_bind_param</function> is used to bind variables for the parameter markers in the SQL statement that was passed to @@ -33,13 +46,22 @@ parameters in the statement. </para> </note> - <example> - <title>Prepared statements</title> - <para>Procedural style:</para> - <programlisting role="php"> + </refsect1> + <refsect1> + <title>Return values</title> + <para> + &return.success; + </para> + </refsect1> + <refsect1> + <title>Example</title> + <example> + <title>Prepared statements</title> + <programlisting role="php"> <![CDATA[ <?php - /* connect to database */ + + /* --- procedural style --- */ $link = mysqli_connect("localhost", "mysql_user", "mysql_password", "mydb") or die("Could not connect: " . mysqli_connect_error()); @@ -62,16 +84,8 @@ mysqli_close_stmt(stmt); mysqli_close(link); -?> -]]> - </programlisting> - <para>Object oriented style:</para> - <programlisting role="php"> -<![CDATA[ -<?php - /* connect to database */ - $mysql = mysqli_connect("localhost", "mysql_user", "mysql_password", "mydb") or - die("Could not connect: " . mysqli_connect_error()); + /* --- object oriented style --- */ + $mysql = new mysqli("localhost", "mysql_user", "mysql_password", "mydb"); /* create mytable */ $mysql->query("CREATE TABLE mytable (a int, b int, c varchar(30))"); @@ -95,13 +109,18 @@ ]]> </programlisting> </example> + </refsect1> + <refsect1> + <title>See also</title> <para> - See also: <function>mysqli_bind_result</function>, + <function>mysqli_bind_result</function>, <function>mysqli_execute</function>, - <function>mysqli_fetch</function> + <function>mysqli_fetch</function>, <!-- <function>mysqli_fetch_column</function> --> - <function>mysqli_prepare</function> - <function>mysqli_send_long_data</function> + <function>mysqli_prepare</function>, + <function>mysqli_send_long_data</function>, + <function>mysqli_stmt_errno</function>, + <function>mysqli_stmt_error</function> </para> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc/en/reference/mysqli/functions/mysqli-bind-result.xml?r1=1.1&r2=1.2&ty=u Index: phpdoc/en/reference/mysqli/functions/mysqli-bind-result.xml diff -u phpdoc/en/reference/mysqli/functions/mysqli-bind-result.xml:1.1 phpdoc/en/reference/mysqli/functions/mysqli-bind-result.xml:1.2 --- phpdoc/en/reference/mysqli/functions/mysqli-bind-result.xml:1.1 Sun May 25 16:48:07 2003 +++ phpdoc/en/reference/mysqli/functions/mysqli-bind-result.xml Wed Jan 28 18:18:42 2004 @@ -1,21 +1,64 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.1 $ --> +<!-- $Revision: 1.2 $ --> <refentry id="function.mysqli-bind-result"> <refnamediv> <refname>mysqli_bind_result</refname> + <refname>stmt->bind_result</refname> <refpurpose>Binds variables to a prepared statement for result storage</refpurpose> </refnamediv> <refsect1> <title>Description</title> + <para>Procedural style:</para> <methodsynopsis> <type>bool</type><methodname>mysqli_bind_result</methodname> - <methodparam><type>resource</type><parameter>stmt</parameter></methodparam> - <methodparam><type>mixed</type><parameter>var</parameter></methodparam> - <methodparam><type>int</type><parameter>len</parameter></methodparam> + <methodparam><type>object</type><parameter>stmt</parameter></methodparam> + <methodparam><type>mixed</type><parameter>var1</parameter></methodparam> + <methodparam choice="opt"><type>mixed</type><parameter>var2, ...</parameter></methodparam> </methodsynopsis> - - &warn.undocumented.func; - + <para>Object oriented style (method):</para> + <classsynopsis> + <ooclass><classname>stmt</classname></ooclass> + <methodsynopsis> + <type>bool</type> + <methodname>bind_result</methodname> + <methodparam><type>mixed</type><parameter>var1</parameter></methodparam> + <methodparam choice="opt"><type>mixed</type><parameter>var2, ...</parameter></methodparam> + </methodsynopsis> + </classsynopsis> + <para> + <function>mysqli_bind_result</function> is used to associate (bind) columns in the result + set to variables. When <function>mysqli_fetch</function> is called to fetch data, the MySQL + client/server protocol places the data for the bound columns into the specified variables + <parameter>var1, ...</parameter>. + </para> + <note> + <para> + Note that all columns must be bound prior to calling <function>mysqli_fetch</function>. + Depending on column types bound variables can silently change to the corresponding PHP type. + </para> + <para> + A column can be bound or rebound at any time, even after a result set has been partially retrieved. + The new binding takes effect the next time <function>mysqli_fetch</function> is called. + </para> + </note> + </refsect1> + <refsect1> + <title>Return values</title> + <para> + &return.success; + </para> + </refsect1> + <refsect1> + <title>See also</title> + <para> + <function>mysqli_bind_param</function>, + <function>mysqli_execute</function>, + <function>mysqli_fetch</function>, +<!-- <function>mysqli_fetch_column</function> --> + <function>mysqli_prepare</function>, + <function>mysqli_stmt_errno</function>, + <function>mysqli_stmt_error</function> + </para> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc/en/reference/mysqli/functions/mysqli-change-user.xml?r1=1.6&r2=1.7&ty=u Index: phpdoc/en/reference/mysqli/functions/mysqli-change-user.xml diff -u phpdoc/en/reference/mysqli/functions/mysqli-change-user.xml:1.6 phpdoc/en/reference/mysqli/functions/mysqli-change-user.xml:1.7 --- phpdoc/en/reference/mysqli/functions/mysqli-change-user.xml:1.6 Sun May 25 15:27:11 2003 +++ phpdoc/en/reference/mysqli/functions/mysqli-change-user.xml Wed Jan 28 18:18:42 2004 @@ -1,28 +1,38 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.6 $ --> +<!-- $Revision: 1.7 $ --> <refentry id="function.mysqli-change-user"> <refnamediv> <refname>mysqli_change_user</refname> + <refname>mysqli->change_user</refname> <refpurpose>Changes the user of the specified database connection</refpurpose> </refnamediv> <refsect1> <title>Description</title> + <para>Procedural style:</para> + <methodsynopsis> + <type>bool</type><methodname>mysqli_change_user</methodname> + <methodparam><type>object</type><parameter>link</parameter></methodparam> + <methodparam><type>string</type><parameter>user</parameter></methodparam> + <methodparam><type>string</type><parameter>password</parameter></methodparam> + <methodparam><type>string</type><parameter>database</parameter></methodparam> + </methodsynopsis> + <para>Object oriented style (method):</para> + <classsynopsis> + <ooclass><classname>mysqli</classname></ooclass> <methodsynopsis> - <type>bool</type><methodname>mysqli_change_user</methodname> - <methodparam><type>resource</type><parameter>link</parameter></methodparam> + <type>bool</type> + <methodname>change_user</methodname> <methodparam><type>string</type><parameter>user</parameter></methodparam> <methodparam><type>string</type><parameter>password</parameter></methodparam> <methodparam><type>string</type><parameter>database</parameter></methodparam> </methodsynopsis> + </classsynopsis> <para> <function>mysqli_change_user</function> is used to change the user of the specified database connection as given by the <parameter>link</parameter> parameter and to set the current database to that specified by the <parameter>database</parameter> parameter. </para> <para> - &return.success; - </para> - <para> If desired, the &null; value may be passed in place of the <parameter>database</parameter> parameter resulting in only changing the user and not selecting a database. To select a database in this case use the <function>mysqli_select_db</function> function. @@ -41,6 +51,15 @@ closing all temporary tables, and unlocking all locked tables. </para> </note> + </refsect1> + <refsect1> + <title>Return Values</title> + <para> + &return.success; + </para> + </refsect1> + <refsect1> + <title>Example</title> <para> <example> <title>Using the mysqli_change_user function</title> http://cvs.php.net/diff.php/phpdoc/en/reference/mysqli/functions/mysqli-character-set-name.xml?r1=1.6&r2=1.7&ty=u Index: phpdoc/en/reference/mysqli/functions/mysqli-character-set-name.xml diff -u phpdoc/en/reference/mysqli/functions/mysqli-character-set-name.xml:1.6 phpdoc/en/reference/mysqli/functions/mysqli-character-set-name.xml:1.7 --- phpdoc/en/reference/mysqli/functions/mysqli-character-set-name.xml:1.6 Mon Dec 15 11:52:08 2003 +++ phpdoc/en/reference/mysqli/functions/mysqli-character-set-name.xml Wed Jan 28 18:18:42 2004 @@ -1,21 +1,38 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.6 $ --> +<!-- $Revision: 1.7 $ --> <refentry id="function.mysqli-character-set-name"> <refnamediv> <refname>mysqli_character_set_name</refname> + <refname>mysqli->character_set_name</refname> <refpurpose>Returns the default character set for the database connection</refpurpose> </refnamediv> <refsect1> <title>Description</title> + <para>Procedural style:</para> <methodsynopsis> <type>string</type><methodname>mysqli_character_set_name</methodname> - <methodparam><type>resource</type><parameter>link</parameter></methodparam> + <methodparam><type>object</type><parameter>link</parameter></methodparam> </methodsynopsis> + <para>Object oriented style (method):</para> + <classsynopsis> + <ooclass><classname>mysqli</classname></ooclass> + <methodsynopsis> + <type>string</type> + <methodname>character_set_name</methodname> + <methodparam><type>void</type><parameter></parameter></methodparam> + </methodsynopsis> + </classsynopsis> <para> Returns the current character set for the database connection specified by the <parameter>link</parameter> parameter. </para> - <para> + </refsect1> + <refsect1> + <title>Return values</title> + <para>The default character set for the current connection</para> + </refsect1> + <refsect1> + <title>Example</title> <example> <title>Using the mysqli_character_set_name function</title> <programlisting role="php"> @@ -27,17 +44,19 @@ /* Print current character set */ $charset = mysqli_character_set_name($link); - echo "Current character set is $charset\n"; + printf ("Current character set is %s\n",$charset); ?> ]]> </programlisting> </example> - </para> - <para> - See also <function>mysqli_real_escape_string</function>. - </para> - </refsect1> + </refsect1> + <refsect1> + <title>See also</title> + <para> + <function>mysqli_real_escape_string</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-close.xml?r1=1.4&r2=1.5&ty=u Index: phpdoc/en/reference/mysqli/functions/mysqli-close.xml diff -u phpdoc/en/reference/mysqli/functions/mysqli-close.xml:1.4 phpdoc/en/reference/mysqli/functions/mysqli-close.xml:1.5 --- phpdoc/en/reference/mysqli/functions/mysqli-close.xml:1.4 Sun May 25 15:09:28 2003 +++ phpdoc/en/reference/mysqli/functions/mysqli-close.xml Wed Jan 28 18:18:42 2004 @@ -1,23 +1,43 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.4 $ --> +<!-- $Revision: 1.5 $ --> <refentry id="function.mysqli-close"> <refnamediv> <refname>mysqli_close</refname> + <refname>mysqli->close</refname> <refpurpose>Closes a previously opened database connection</refpurpose> </refnamediv> <refsect1> <title>Description</title> + <para>Procedural style:</para> + <methodsynopsis> + <type>bool</type><methodname>mysqli_close</methodname> + <methodparam><type>object</type><parameter>link</parameter></methodparam> + </methodsynopsis> + <para>Object oriented style (method):</para> + <classsynopsis> + <ooclass><classname>mysqli</classname></ooclass> <methodsynopsis> - <type>bool</type><methodname>mysqli_close</methodname> - <methodparam><type>resource</type><parameter>link</parameter></methodparam> + <type>bool</type> + <methodname>close</methodname> + <methodparam><type>void</type><parameter></parameter></methodparam> </methodsynopsis> + </classsynopsis> <para> The <function>mysqli_close</function> function closes a previously opened database - connection specified by the <parameter>link</parameter> parameter. + connection specified by the link parameter. </para> + </refsect1> + <refsect1> + <title>Return values</title> + <para> + &return.success; + </para> + </refsect1> + <refsect1> + <title>See also</title> <para> - See also - <function>mysqli_connect</function> and + <function>mysqli_connect</function>, + <function>mysqli_init</function>, <function>mysqli_real_connect</function>. </para> </refsect1> http://cvs.php.net/diff.php/phpdoc/en/reference/mysqli/functions/mysqli-commit.xml?r1=1.3&r2=1.4&ty=u Index: phpdoc/en/reference/mysqli/functions/mysqli-commit.xml diff -u phpdoc/en/reference/mysqli/functions/mysqli-commit.xml:1.3 phpdoc/en/reference/mysqli/functions/mysqli-commit.xml:1.4 --- phpdoc/en/reference/mysqli/functions/mysqli-commit.xml:1.3 Sun May 25 15:09:28 2003 +++ phpdoc/en/reference/mysqli/functions/mysqli-commit.xml Wed Jan 28 18:18:42 2004 @@ -1,23 +1,43 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.3 $ --> +<!-- $Revision: 1.4 $ --> <refentry id="function.mysqli-commit"> <refnamediv> <refname>mysqli_commit</refname> + <refname>mysqli->commit</refname> <refpurpose>Commits the current transaction</refpurpose> </refnamediv> <refsect1> <title>Description</title> + <para>Procedural style:</para> + <methodsynopsis> + <type>bool</type><methodname>mysqli_commit</methodname> + <methodparam><type>object</type><parameter>link</parameter></methodparam> + </methodsynopsis> + <para>Object oriented style (method)</para> + <classsynopsis> + <ooclass><classname>mysqli</classname></ooclass> <methodsynopsis> - <type>bool</type><methodname>mysqli_commit</methodname> - <methodparam><type>resource</type><parameter>link</parameter></methodparam> + <type>bool</type> + <methodname>commit</methodname> + <methodparam><type>void</type><parameter></parameter></methodparam> </methodsynopsis> + </classsynopsis> <para> Commits the current transaction for the database specified by the <parameter>link</parameter> parameter. </para> + </refsect1> + <refsect1> + <title>Return values</title> + <para> + &return.success; + </para> + </refsect1> + <refsect1> + <title>See also</title> <para> - See also <function>mysqli_autocommit</function>, - <function>mysqli_rollback</function>. + <function>mysqli_autocommit</function>, + <function>mysqli_rollback</function>. </para> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc/en/reference/mysqli/functions/mysqli-connect.xml?r1=1.6&r2=1.7&ty=u Index: phpdoc/en/reference/mysqli/functions/mysqli-connect.xml diff -u phpdoc/en/reference/mysqli/functions/mysqli-connect.xml:1.6 phpdoc/en/reference/mysqli/functions/mysqli-connect.xml:1.7 --- phpdoc/en/reference/mysqli/functions/mysqli-connect.xml:1.6 Sun May 25 15:27:11 2003 +++ phpdoc/en/reference/mysqli/functions/mysqli-connect.xml Wed Jan 28 18:18:42 2004 @@ -1,27 +1,42 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.6 $ --> +<!-- $Revision: 1.7 $ --> <refentry id="function.mysqli-connect"> <refnamediv> <refname>mysqli_connect</refname> + <refname>mysqli()</refname> <refpurpose>Open a new connection to the MySQL server</refpurpose> </refnamediv> <refsect1> <title>Description</title> - <methodsynopsis> - <type>resource</type><methodname>mysqli_connect</methodname> + <para>Procedural style</para> + <methodsynopsis> + <type>object</type><methodname>mysqli_connect</methodname> + <methodparam choice='opt'><type>string</type><parameter>hostname</parameter></methodparam> + <methodparam choice='opt'><type>string</type><parameter>username</parameter></methodparam> + <methodparam choice='opt'><type>string</type><parameter>passwd</parameter></methodparam> + <methodparam choice='opt'><type>string</type><parameter>dbname</parameter></methodparam> + <methodparam choice='opt'><type>int</type><parameter>port</parameter></methodparam> + <methodparam choice='opt'><type>string</type><parameter>socket</parameter></methodparam> + </methodsynopsis> + <para>Object oriented style (constructor):</para> + <classsynopsis> + <ooclass><classname>mysqli</classname></ooclass> + <constructorsynopsis> + <methodname></methodname> <methodparam choice='opt'><type>string</type><parameter>hostname</parameter></methodparam> <methodparam choice='opt'><type>string</type><parameter>username</parameter></methodparam> <methodparam choice='opt'><type>string</type><parameter>passwd</parameter></methodparam> <methodparam choice='opt'><type>string</type><parameter>dbname</parameter></methodparam> <methodparam choice='opt'><type>int</type><parameter>port</parameter></methodparam> <methodparam choice='opt'><type>string</type><parameter>socket</parameter></methodparam> - </methodsynopsis> + </constructorsynopsis> + </classsynopsis> <para> The <function>mysqli_connect</function> function attempts to open a connection to the MySQL Server running on <parameter>host</parameter> which can be either a hostname or an IP address. Passing the &null; value or the string "localhost" to this parameter, the local host is assumed. When possible, pipes will be used instead of the TCP/IP protocol. If successful, the <function>mysqli_connect</function> - will return a resource representing the connection to the database, or &false; on failure. + will return an object representing the connection to the database, or &false; on failure. </para> <para> The <parameter>username</parameter> and <parameter>password</parameter> parameters specify the @@ -48,24 +63,61 @@ MySQL database is determined by the <parameter>host</parameter> parameter. </para> </note> + </refsect1> + <refsect1> + <title>Return values</title> + <para> + Returns a object which represents the connection to a MySQL Server or &false if the connection failed. + </para> + </refsect1> + <refsect1> + <title>Example</title> <para> <example> <title>Using the mysqli_connect function</title> <programlisting role="php"> <![CDATA[ <?php - -/* Open a connection as foo@localhost and make bar the default database */ -$link = mysqli_connect("localhost", "foo", "password", "bar"); +/* + +-----------------------------------------------------------+ + | file: mysqli_connect.php | + +-----------------------------------------------------------+ + | connects to MySQL server on localhost and prints host | + | information | + +-----------------------------------------------------------+ +*/ + + /* ---- Procedural style ---- */ + $link = mysqli_connect("localhost", "my_user", "my_password", "test") + or die("Can't connect to MySQL server on localhost"); + + printf("Host information: %s\n", mysqli_get_host_info($link)); -?> + mysqli_close($link); + + /* ---- Object oriented style ----*/ + $mysqli = new mysqli("localhost", "my_user", "my_password", "test"); + + if (mysqli_connect_errno()) { + printf("Connect failed: %s\n", mysqli_connect_error()); + exit(); + } + + printf("Host information: %s\n", $mysqli->host_info); + + $mysqli->close(); +?> ]]> </programlisting> </example> </para> + </refsect1> + <refsect1> + <title>See also</title> <para> - See also - <function>mysqli_close</function> and + <function>mysqli_close</function>, + <function>mysqli_init</function>, + <function>mysqli_options</function> <function>mysqli_real_connect</function>. </para> </refsect1> http://cvs.php.net/diff.php/phpdoc/en/reference/mysqli/functions/mysqli-data-seek.xml?r1=1.9&r2=1.10&ty=u Index: phpdoc/en/reference/mysqli/functions/mysqli-data-seek.xml diff -u phpdoc/en/reference/mysqli/functions/mysqli-data-seek.xml:1.9 phpdoc/en/reference/mysqli/functions/mysqli-data-seek.xml:1.10 --- phpdoc/en/reference/mysqli/functions/mysqli-data-seek.xml:1.9 Thu Dec 18 09:14:31 2003 +++ phpdoc/en/reference/mysqli/functions/mysqli-data-seek.xml Wed Jan 28 18:18:42 2004 @@ -1,17 +1,28 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.9 $ --> +<!-- $Revision: 1.10 $ --> <refentry id="function.mysqli-data-seek"> <refnamediv> <refname>mysqli_data_seek</refname> - <refpurpose>Adjusts the result pointer to an arbitrary row in the result</refpurpose> + <refname>result->data_seek</refname> + <refpurpose>Adjusts the result pointer to an arbitary row in the result</refpurpose> </refnamediv> <refsect1> <title>Description</title> + <para>Procedural style:</para> + <methodsynopsis> + <type>bool</type><methodname>mysqli_data_seek</methodname> + <methodparam><type>object</type><parameter>result</parameter></methodparam> + <methodparam><type>int</type><parameter>offset</parameter></methodparam> + </methodsynopsis> + <para>Object oriented style (method):</para> + <classsynopsis> + <ooclass><classname>result</classname></ooclass> <methodsynopsis> - <type>void</type><methodname>mysqli_data_seek</methodname> - <methodparam><type>resource</type><parameter>result</parameter></methodparam> + <type>bool</type> + <methodname>data_seek</methodname> <methodparam><type>int</type><parameter>offset</parameter></methodparam> </methodsynopsis> + </classsynopsis> <para> The <function>mysqli_data_seek</function> function seeks to an arbitrary result pointer specified by the <parameter>offset</parameter> in the result set represented by @@ -20,10 +31,19 @@ </para> <note> <para> - This function can only be used with results attained from the use of the - <function>mysqli_store_result</function> function. + This function can only be used with unbuffered results attained from the use of the + <function>mysqli_store_result</function> or <function>mysqli_query</function> functions. </para> </note> + </refsect1> + <refsect1> + <title>Return values</title> + <para> + &return.success; + </para> + </refsect1> + <refsect1> + <title>Example</title> <para> <example> <title>Using the mysqli_data_seek function</title> @@ -47,20 +67,23 @@ /* 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]); + printf ("Employee name : %s\n", $employee[0]); } mysqli_free_result($rows); + mysqli_close($link); ?> ]]> </programlisting> </example> </para> + </refsect1> + <refsect1> + <title>See also</title> <para> - See also <function>mysqli_store_result</function>, - <function>mysqli_fetch_row</function> and + <function>mysqli_fetch_row</function>, <function>mysqli_num_rows</function>. </para> </refsect1> http://cvs.php.net/diff.php/phpdoc/en/reference/mysqli/functions/mysqli-debug.xml?r1=1.4&r2=1.5&ty=u Index: phpdoc/en/reference/mysqli/functions/mysqli-debug.xml diff -u phpdoc/en/reference/mysqli/functions/mysqli-debug.xml:1.4 phpdoc/en/reference/mysqli/functions/mysqli-debug.xml:1.5 --- phpdoc/en/reference/mysqli/functions/mysqli-debug.xml:1.4 Sun May 25 15:27:11 2003 +++ phpdoc/en/reference/mysqli/functions/mysqli-debug.xml Wed Jan 28 18:18:42 2004 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.4 $ --> +<!-- $Revision: 1.5 $ --> <refentry id="function.mysqli-debug"> <refnamediv> <refname>mysqli_debug</refname> @@ -16,6 +16,13 @@ operations using the Fred Fish debugging library. The <parameter>debug</parameter> parameter is a string representing the debugging operation to perform. </para> + </refsect1> + <refsect1> + <title>Return values</title> + <para><function>mysqli_debug</function> doesn't return any value.</para> + </refsect1> + <refsect1> + <title>Example</title> <para> <example> <title>Generating a Trace File</title> @@ -32,6 +39,12 @@ </example> </para> </refsect1> + <refsect1> + <title>See also</title> + <para> + <function>mysqli_dump_debug_info</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-dump-debug-info.xml?r1=1.5&r2=1.6&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.5 phpdoc/en/reference/mysqli/functions/mysqli-dump-debug-info.xml:1.6 --- phpdoc/en/reference/mysqli/functions/mysqli-dump-debug-info.xml:1.5 Thu Dec 18 09:14:31 2003 +++ phpdoc/en/reference/mysqli/functions/mysqli-dump-debug-info.xml Wed Jan 28 18:18:42 2004 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.5 $ --> +<!-- $Revision: 1.6 $ --> <refentry id="function.mysqli-dump-debug-info"> <refnamediv> <refname>mysqli_dump_debug_info</refname> @@ -9,17 +9,26 @@ <title>Description</title> <methodsynopsis> <type>bool</type><methodname>mysqli_dump_debug_info</methodname> - <methodparam><type>resource</type><parameter>link</parameter></methodparam> + <methodparam><type>object</type><parameter>link</parameter></methodparam> </methodsynopsis> <para> - This function is designed to be executed by an user with the SUPER privilege and + This function is designed to be executed by an user with the SUPER privlege and is used to dump debugging information into the log for the MySQL Server relating to the connection specified by the <parameter>link</parameter> parameter. </para> + </refsect1> + <refsect1> + <title>Return values</title> <para> &return.success; </para> </refsect1> + <refsect1> + <title>See also</title> + <para> + <function>mysqli_debug</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-errno.xml?r1=1.5&r2=1.6&ty=u Index: phpdoc/en/reference/mysqli/functions/mysqli-errno.xml diff -u phpdoc/en/reference/mysqli/functions/mysqli-errno.xml:1.5 phpdoc/en/reference/mysqli/functions/mysqli-errno.xml:1.6 --- phpdoc/en/reference/mysqli/functions/mysqli-errno.xml:1.5 Thu Dec 18 09:14:31 2003 +++ phpdoc/en/reference/mysqli/functions/mysqli-errno.xml Wed Jan 28 18:18:42 2004 @@ -1,30 +1,48 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.5 $ --> +<!-- $Revision: 1.6 $ --> <refentry id="function.mysqli-errno"> <refnamediv> <refname>mysqli_errno</refname> + <refname>mysql->errno</refname> <refpurpose>Returns the error code for the most recent function call</refpurpose> </refnamediv> <refsect1> <title>Description</title> + <para>Procedural style:</para> <methodsynopsis> <type>int</type><methodname>mysqli_errno</methodname> - <methodparam><type>resource</type><parameter>link</parameter></methodparam> + <methodparam><type>object</type><parameter>link</parameter></methodparam> </methodsynopsis> + <para>Object oriented style (property):</para> + <classsynopsis> + <ooclass><classname>mysqli</classname></ooclass> + <fieldsynopsis><type>int</type><varname>errno</varname></fieldsynopsis> + </classsynopsis> <para> The <function>mysqli_errno</function> function will return the last error code for the most recent MySQLi function call that can succeed or fail with respect to the database link defined by the <parameter>link</parameter> parameter. If no errors - have occurred, this function will return zero. + have occured, this function will return zero. </para> <note> <para> - A complete list of the error codes and their meanings can be found in the constants - section of the MySQLi documentation + Client error message numbers are listed in the MySQL <filename>errmsg.h</filename> header file, + server error message numbers are listed in <filename>mysqld_error.h</filename>. + In the MySQL source distribution you can find a complete list of error messages and error numbers + in the file <filename>Docs/mysqld_error.txt</filename>. </para> </note> + </refsect1> + <refsect1> + <title>Return values</title> + <para> + An error code value for the last call, if it failed. zero means no error occurred. + </para> + </refsect1> + <refsect1> + <title>See also</title> <para> - See also <function>mysqli_error</function>. + <function>mysqli_error</function>, <function>mysqli_sqlstate</function> </para> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc/en/reference/mysqli/functions/mysqli-error.xml?r1=1.7&r2=1.8&ty=u Index: phpdoc/en/reference/mysqli/functions/mysqli-error.xml diff -u phpdoc/en/reference/mysqli/functions/mysqli-error.xml:1.7 phpdoc/en/reference/mysqli/functions/mysqli-error.xml:1.8 --- phpdoc/en/reference/mysqli/functions/mysqli-error.xml:1.7 Thu Dec 18 09:14:31 2003 +++ phpdoc/en/reference/mysqli/functions/mysqli-error.xml Wed Jan 28 18:18:42 2004 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.7 $ --> +<!-- $Revision: 1.8 $ --> <refentry id="function.mysqli-error"> <refnamediv> <refname>mysqli_error</refname> @@ -7,18 +7,33 @@ </refnamediv> <refsect1> <title>Description</title> + <para>Procedural style:</para> <methodsynopsis> <type>string</type><methodname>mysqli_error</methodname> - <methodparam><type>resource</type><parameter>link</parameter></methodparam> + <methodparam><type>object</type><parameter>link</parameter></methodparam> </methodsynopsis> + <para>Object oriented style (property)</para> + <classsynopsis> + <ooclass><classname>mysqli</classname></ooclass> + <fieldsynopsis><type>string</type><varname>error</varname></fieldsynopsis> + </classsynopsis> <para> The <function>mysqli_error</function> function is identical to the corresponding <function>mysqli_errno</function> function in every way, except instead of returning an integer error code the <function>mysqli_error</function> function will return a string representation of the last error to occur for the database connection - represented by the <parameter>link</parameter> parameter. If no error has occurred, + represented by the <parameter>link</parameter> parameter. If no error has occured, this function will return an empty string. </para> + </refsect1> + <refsect1> + <title>Return values</title> + <para> + A string that describes the error. An empty string if no error occurred. + </para> + </refsect1> + <refsect1> + <title>Example</title> <para> <example> <title>Using the mysqli_error function</title> @@ -36,8 +51,11 @@ </programlisting> </example> </para> + </refsect1> + <refsect1> + <title>See also</title> <para> - See also <function>mysqli_errno</function>. + <function>mysqli_errno</function>, <function>mysqli_sqlstate</function>. </para> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc/en/reference/mysqli/functions/mysqli-execute.xml?r1=1.7&r2=1.8&ty=u Index: phpdoc/en/reference/mysqli/functions/mysqli-execute.xml diff -u phpdoc/en/reference/mysqli/functions/mysqli-execute.xml:1.7 phpdoc/en/reference/mysqli/functions/mysqli-execute.xml:1.8 --- phpdoc/en/reference/mysqli/functions/mysqli-execute.xml:1.7 Thu Dec 18 09:14:31 2003 +++ phpdoc/en/reference/mysqli/functions/mysqli-execute.xml Wed Jan 28 18:18:42 2004 @@ -1,21 +1,32 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.7 $ --> +<!-- $Revision: 1.8 $ --> <refentry id="function.mysqli-execute"> <refnamediv> <refname>mysqli_execute</refname> + <refname>stmt->execute</refname> <refpurpose>Executes a prepared Query</refpurpose> </refnamediv> <refsect1> <title>Description</title> + <para>Procedural style:</para> <methodsynopsis> - <type>int</type><methodname>mysqli_execute</methodname> - <methodparam><type>resource</type><parameter>stmt</parameter></methodparam> + <type>bool</type><methodname>mysqli_execute</methodname> + <methodparam><type>object</type><parameter>stmt</parameter></methodparam> </methodsynopsis> + <para>Object oriented style (method):</para> + <classsynopsis> + <ooclass><classname>mysql</classname></ooclass> + <methodsynopsis> + <type>bool</type> + <methodname>execute</methodname> + <methodparam><type>void</type><parameter></parameter></methodparam> + </methodsynopsis> + </classsynopsis> <para> The <function>mysqli_execute</function> function executes a query that has been previously prepared using the <function>mysqli_prepare</function> function represented by the - <parameter>stmt</parameter> resource. When executed any parameter markers which exist will - automatically be replaced with the appropriate data. + <parameter>stmt</parameter> object. When executed any parameter markers which exist will + automatically be replaced with the appropiate data. </para> <para> If the statement is UPDATE, DELETE, or INSERT, the total number of affected rows can be @@ -28,6 +39,13 @@ function must be used to fetch the data prior to preforming any additional queries. </para> </note> + </refsect1> + <refsect1> + <title>Return values</title> + <para>&return.success;</para> + </refsect1> + <refsect1> + <title>Example</title> <para> <example> <title>Using the mysqli_execute function</title> @@ -68,9 +86,11 @@ </programlisting> </example> </para> + </refsect1> + <refsect1> + <title>See also</title> <para> - See also - <function>mysqli_prepare</function> and + <function>mysqli_prepare</function> <function>mysqli_bind_param</function>. </para> </refsect1> http://cvs.php.net/diff.php/phpdoc/en/reference/mysqli/functions/mysqli-fetch-array.xml?r1=1.8&r2=1.9&ty=u Index: phpdoc/en/reference/mysqli/functions/mysqli-fetch-array.xml diff -u phpdoc/en/reference/mysqli/functions/mysqli-fetch-array.xml:1.8 phpdoc/en/reference/mysqli/functions/mysqli-fetch-array.xml:1.9 --- phpdoc/en/reference/mysqli/functions/mysqli-fetch-array.xml:1.8 Mon Dec 15 11:52:08 2003 +++ phpdoc/en/reference/mysqli/functions/mysqli-fetch-array.xml Wed Jan 28 18:18:42 2004 @@ -1,17 +1,28 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.8 $ --> +<!-- $Revision: 1.9 $ --> <refentry id="function.mysqli-fetch-array"> <refnamediv> <refname>mysqli_fetch_array</refname> + <refname>result->fetch_array</refname> <refpurpose>Fetch a result row as an associative, a numeric array, or both.</refpurpose> </refnamediv> <refsect1> <title>Description</title> + <para>Procedural style:</para> <methodsynopsis> - <type>array</type><methodname>mysqli_fetch_array</methodname> - <methodparam><type>resource</type><parameter>result</parameter></methodparam> + <type>mixed</type><methodname>mysqli_fetch_array</methodname> + <methodparam><type>object</type><parameter>result</parameter></methodparam> <methodparam choice='opt'><type>int</type><parameter>resulttype</parameter></methodparam> </methodsynopsis> + <para>Object oriend style (method):</para> + <classsynopsis> + <ooclass><classname>result</classname></ooclass> + <methodsynopsis> + <type>mixed</type> + <methodname>fetch_array</methodname> + <methodparam choice='opt'><type>int</type><parameter>resulttype</parameter></methodparam> + </methodsynopsis> + </classsynopsis> <para> Returns an array that corresponds to the fetched row or &false; if there are no more rows for the database connection represented by the <parameter>link</parameter> parameter. @@ -40,6 +51,15 @@ <function>mysqli_fetch_row</function> function. The final option MYSQLI_BOTH will create a single array with the attributes of both. </para> + </refsect1> + <refsect1> + <title>Return values</title> + <para> + Returns an array that corresponds to the fetched row or &false; if there are no more rows in resultset. + </para> + </refsect1> + <refsect1> + <title>Example</title> <para> <example> <title>mysqli_fetch_array with MYSQLI_NUM</title> @@ -53,7 +73,7 @@ $result = mysqli_query("SELECT id, name FROM mytable"); while ($row = mysqli_fetch_array($result, MYSQLI_NUM)) { - printf("ID: %s Name: %s", $row[0], $row[1]); + printf ("ID: %s Name: %s", $row[0], $row[1]); } mysqli_free_result($result); @@ -102,9 +122,12 @@ </programlisting> </example> </para> + </refsect1> + <refsect1> + <title>See also</title> <para> - See also <function>mysqli_fetch_assoc</function>, - <function>mysqli_fetch_row</function> and + <function>mysqli_fetch_assoc</function>, + <function>mysqli_fetch_row</function>, <function>mysqli_fetch_object</function>. </para> </refsect1> http://cvs.php.net/diff.php/phpdoc/en/reference/mysqli/functions/mysqli-fetch-assoc.xml?r1=1.6&r2=1.7&ty=u Index: phpdoc/en/reference/mysqli/functions/mysqli-fetch-assoc.xml diff -u phpdoc/en/reference/mysqli/functions/mysqli-fetch-assoc.xml:1.6 phpdoc/en/reference/mysqli/functions/mysqli-fetch-assoc.xml:1.7 --- phpdoc/en/reference/mysqli/functions/mysqli-fetch-assoc.xml:1.6 Thu Dec 18 09:14:31 2003 +++ phpdoc/en/reference/mysqli/functions/mysqli-fetch-assoc.xml Wed Jan 28 18:18:42 2004 @@ -1,16 +1,27 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.6 $ --> +<!-- $Revision: 1.7 $ --> <refentry id="function.mysqli-fetch-assoc"> <refnamediv> <refname>mysqli_fetch_assoc</refname> + <refname>mysqli->fetch_assoc</refname> <refpurpose>Fetch a result row as an associative array</refpurpose> </refnamediv> <refsect1> <title>Description</title> + <para>Procedural style:</para> <methodsynopsis> <type>array</type><methodname>mysqli_fetch_assoc</methodname> - <methodparam><type>resource</type><parameter>result</parameter></methodparam> + <methodparam><type>object</type><parameter>result</parameter></methodparam> </methodsynopsis> + <para>Object oriend style (method):</para> + <classsynopsis> + <ooclass><classname>result</classname></ooclass> + <methodsynopsis> + <type>array</type> + <methodname>fetch_assoc</methodname> + <methodparam><type>void</type><parameter></parameter></methodparam> + </methodsynopsis> + </classsynopsis> <para> Returns an associative array that corresponds to the fetched row or &false; if there are no more rows. @@ -24,11 +35,20 @@ <para> If two or more columns in the result set have the same column name, the associative array returned by the <function>mysqli_fetch_assoc</function> function will contain the value of - the last column of that name. If you must work with result sets with this property, the + the last column of that name. If you must work with result sets with this properity, the <function>mysqli_fetch_row</function> should be used which returns an numerically-indexed array instead. </para> &database.field-case; + </refsect1> + <refsect1> + <title>Return values</title> + <para> + Returns an array that corresponds to the fetched row or &false; if there are no more rows in resultset. + </para> + </refsect1> + <refsect1> + <title>Example</title> <example> <title>An expanded <function>mysqli_fetch_assoc</function> example</title> <programlisting role="php"> @@ -79,9 +99,12 @@ ]]> </programlisting> </example> + </refsect1> + <refsect1> + <title>See also</title> <para> - See also <function>mysqli_fetch_array</function>, - <function>mysqli_fetch_row</function> and + <function>mysqli_fetch_array</function>, + <function>mysqli_fetch_row</function>, <function>mysqli_fetch_object</function>. </para> </refsect1> http://cvs.php.net/diff.php/phpdoc/en/reference/mysqli/functions/mysqli-fetch-field-direct.xml?r1=1.2&r2=1.3&ty=u Index: phpdoc/en/reference/mysqli/functions/mysqli-fetch-field-direct.xml diff -u phpdoc/en/reference/mysqli/functions/mysqli-fetch-field-direct.xml:1.2 phpdoc/en/reference/mysqli/functions/mysqli-fetch-field-direct.xml:1.3 --- phpdoc/en/reference/mysqli/functions/mysqli-fetch-field-direct.xml:1.2 Sat May 24 02:44:21 2003 +++ phpdoc/en/reference/mysqli/functions/mysqli-fetch-field-direct.xml Wed Jan 28 18:18:42 2004 @@ -1,22 +1,50 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.2 $ --> +<!-- $Revision: 1.3 $ --> <refentry id="function.mysqli-fetch-field-direct"> <refnamediv> <refname>mysqli_fetch_field_direct</refname> + <refname>result->fetch_field_direct</refname> <refpurpose> Fetch meta-data for a single field </refpurpose> </refnamediv> <refsect1> <title>Description</title> + <para>Procedural style:</para> <methodsynopsis> - <type>int</type><methodname>mysqli_fetch_field_direct</methodname> - <methodparam><type>resource</type><parameter>result</parameter></methodparam> - <methodparam><type>int</type><parameter>offset</parameter></methodparam> + <type>mixed</type><methodname>mysqli_fetch_field_direct</methodname> + <methodparam><type>object</type><parameter>result</parameter></methodparam> + <methodparam><type>int</type><parameter>fieldnr</parameter></methodparam> </methodsynopsis> - - &warn.undocumented.func; - + <para>Object oriented style (method):</para> + <classsynopsis> + <ooclass><classname>result</classname></ooclass> + <methodsynopsis> + <type>mixed</type> + <methodname>fetch_field_direct</methodname> + <methodparam><type>int</type><parameter>fieldnr</parameter></methodparam> + </methodsynopsis> + </classsynopsis> + <para> + <function>mysqli_fetch_field_direct</function> returns an associative array which contains + field definition informations from specified resultset. The value of fieldnr must be in the + range from <literal>0</literal> to <literal>number of fields - 1</literal>. + </para> + </refsect1> + <refsect1> + <title>Return values</title> + <para> + Returns an associative array which contains field definition informations or &false; if no field information + for specified <literal>fieldnr</literal> is available. + </para> + </refsect1> + <refsect1> + <title>See also</title> + <para> + <function>mysqli_num_fields</function> + <function>mysqli_fetch_field</function> + <function>mysqli_fetch_fields</function> + </para> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc/en/reference/mysqli/functions/mysqli-fetch-field.xml?r1=1.5&r2=1.6&ty=u Index: phpdoc/en/reference/mysqli/functions/mysqli-fetch-field.xml diff -u phpdoc/en/reference/mysqli/functions/mysqli-fetch-field.xml:1.5 phpdoc/en/reference/mysqli/functions/mysqli-fetch-field.xml:1.6 --- phpdoc/en/reference/mysqli/functions/mysqli-fetch-field.xml:1.5 Wed Jun 11 09:45:28 2003 +++ phpdoc/en/reference/mysqli/functions/mysqli-fetch-field.xml Wed Jan 28 18:18:42 2004 @@ -1,16 +1,27 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.5 $ --> +<!-- $Revision: 1.6 $ --> <refentry id="function.mysqli-fetch-field"> <refnamediv> <refname>mysqli_fetch_field</refname> + <refname>result->fetch_field</refname> <refpurpose>Returns the next field in the result set</refpurpose> </refnamediv> <refsect1> <title>Description</title> + <para>Procedural style:</para> + <methodsynopsis> + <type>mixed</type><methodname>mysqli_fetch_field</methodname> + <methodparam><type>object</type><parameter>result</parameter></methodparam> + </methodsynopsis> + <para>Object oriented style (method):</para> + <classsynopsis> + <ooclass><classname>result</classname></ooclass> <methodsynopsis> - <type>object</type><methodname>mysqli_fetch_field</methodname> - <methodparam><type>resource</type><parameter>result</parameter></methodparam> + <type>mixed</type> + <methodname>fetch_field</methodname> + <methodparam><type>void</type><parameter></parameter></methodparam> </methodsynopsis> + </classsynopsis> <para> The <function>mysqli_fetch_field</function> function is used to return the attributes of the next column in the result set represented by the <parameter>result</parameter> @@ -35,7 +46,7 @@ </row> <row> <entry>orgname</entry> - <entry>?</entry> + <entry>Original column name if an alias was specified</entry> </row> <row> <entry>table</entry> @@ -43,7 +54,7 @@ </row> <row> <entry>orgtable</entry> - <entry>?</entry> + <entry>Original table name if an alias was specified</entry> </row> <row> <entry>def</entry> @@ -70,6 +81,21 @@ </table> </para> </refsect1> + <refsect1> + <title>Return values</title> + <para> + Returns an object which contains field definition informations or &false; if no field information + is available. + </para> + </refsect1> + <refsect1> + <title>See also</title> + <para> + <function>mysqli_num_fields</function> + <function>mysqli_fetch_field_direct</function> + <function>mysqli_fetch_fields</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-fetch-fields.xml?r1=1.5&r2=1.6&ty=u Index: phpdoc/en/reference/mysqli/functions/mysqli-fetch-fields.xml diff -u phpdoc/en/reference/mysqli/functions/mysqli-fetch-fields.xml:1.5 phpdoc/en/reference/mysqli/functions/mysqli-fetch-fields.xml:1.6 --- phpdoc/en/reference/mysqli/functions/mysqli-fetch-fields.xml:1.5 Wed Jun 11 09:45:28 2003 +++ phpdoc/en/reference/mysqli/functions/mysqli-fetch-fields.xml Wed Jan 28 18:18:42 2004 @@ -1,16 +1,27 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.5 $ --> +<!-- $Revision: 1.6 $ --> <refentry id="function.mysqli-fetch-fields"> <refnamediv> <refname>mysqli_fetch_fields</refname> + <refname>result->fetch_fields</refname> <refpurpose>Returns an array of objects representing the fields in a result set</refpurpose> </refnamediv> <refsect1> <title>Description</title> + <para>Procedural Style:</para> <methodsynopsis> - <type>array</type><methodname>mysqli_fetch_fields</methodname> - <methodparam><type>resource</type><parameter>result</parameter></methodparam> + <type>mixed</type><methodname>mysqli_fetch_fields</methodname> + <methodparam><type>object</type><parameter>result</parameter></methodparam> </methodsynopsis> + <para>Object oriented style (method):</para> + <classsynopsis> + <ooclass><classname>result</classname></ooclass> + <methodsynopsis> + <type>mixed</type> + <methodname>fetch_fields</methodname> + <methodparam><type>int</type><parameter>fieldnr</parameter></methodparam> + </methodsynopsis> + </classsynopsis> <para> This function serves an identical purpose to the <function>mysqli_fetch_field</function> function with the single difference that, instead of returning one object at a time for @@ -19,6 +30,21 @@ function. </para> </refsect1> + <refsect1> + <title>Return values</title> + <para> + Returns an array of objects which contains field definition informations or &false; if no field information + is available. + </para> + </refsect1> + <refsect1> + <title>See also</title> + <para> + <function>mysqli_num_fields</function> + <function>mysqli_fetch_field</function> + <function>mysqli_fetch_field_direct</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-fetch-lengths.xml?r1=1.4&r2=1.5&ty=u Index: phpdoc/en/reference/mysqli/functions/mysqli-fetch-lengths.xml diff -u phpdoc/en/reference/mysqli/functions/mysqli-fetch-lengths.xml:1.4 phpdoc/en/reference/mysqli/functions/mysqli-fetch-lengths.xml:1.5 --- phpdoc/en/reference/mysqli/functions/mysqli-fetch-lengths.xml:1.4 Tue Sep 30 04:33:39 2003 +++ phpdoc/en/reference/mysqli/functions/mysqli-fetch-lengths.xml Wed Jan 28 18:18:42 2004 @@ -1,16 +1,23 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.4 $ --> +<!-- $Revision: 1.5 $ --> <refentry id="function.mysqli-fetch-lengths"> <refnamediv> <refname>mysqli_fetch_lengths</refname> + <refname>result->fetch_lengths</refname> <refpurpose>Returns the lengths of the columns of the current row in the result set</refpurpose> </refnamediv> <refsect1> <title>Description</title> - <methodsynopsis> - <type>array</type><methodname>mysqli_fetch_lengths</methodname> - <methodparam><type>resource</type><parameter>result</parameter></methodparam> - </methodsynopsis> + <para>Procedural style:</para> + <methodsynopsis> + <type>mixed</type><methodname>mysqli_fetch_lengths</methodname> + <methodparam><type>object</type><parameter>result</parameter></methodparam> + </methodsynopsis> + <para>Object oriented style (property):</para> + <classsynopsis> + <ooclass><classname>result</classname></ooclass> + <fieldsynopsis><type>mixed</type><varname>fetch_lengths</varname></fieldsynopsis> + </classsynopsis> <para> The <function>mysqli_fetch_lengths</function> function returns an array containing the lengths of every column of the current row within the result set represented by the @@ -18,6 +25,18 @@ representing the lengths of each column is returned or &false; on failure. </para> </refsect1> + <refsect1> + <title>Return values</title> + <para> + An array of integers representing the size of each column + (not including any terminating null characters). &false if an error occurred. + </para> + <para> + <function>mysql_fetch_lengths</function> is valid only for the current row of the result set. + It returns &false; if you call it before calling mysql_fetch_row/array/object or after retrieving + all rows in the result. + </para> + </refsect1> </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/diff.php/phpdoc/en/reference/mysqli/functions/mysqli-fetch-object.xml?r1=1.6&r2=1.7&ty=u Index: phpdoc/en/reference/mysqli/functions/mysqli-fetch-object.xml diff -u phpdoc/en/reference/mysqli/functions/mysqli-fetch-object.xml:1.6 phpdoc/en/reference/mysqli/functions/mysqli-fetch-object.xml:1.7 --- phpdoc/en/reference/mysqli/functions/mysqli-fetch-object.xml:1.6 Thu Jul 3 04:26:08 2003 +++ phpdoc/en/reference/mysqli/functions/mysqli-fetch-object.xml Wed Jan 28 18:18:42 2004 @@ -1,25 +1,45 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.6 $ --> +<!-- $Revision: 1.7 $ --> <refentry id="function.mysqli-fetch-object"> <refnamediv> <refname>mysqli_fetch_object</refname> + <refname>result->fetch_object</refname> <refpurpose>Returns the current row of a result set as an object</refpurpose> </refnamediv> <refsect1> <title>Description</title> + <para>Procedural style:</para> + <methodsynopsis> + <type>mixed</type><methodname>mysqli_fetch_object</methodname> + <methodparam><type>object</type><parameter>result</parameter></methodparam> + </methodsynopsis> + <para>Object oriented style (method):</para> + <classsynopsis> + <ooclass><classname>result</classname></ooclass> <methodsynopsis> - <type>object</type><methodname>mysqli_fetch_object</methodname> - <methodparam><type>resource</type><parameter>result</parameter></methodparam> + <type>mixed</type> + <methodname>fetch_object</methodname> + <methodparam><type>void</type><parameter></parameter></methodparam> </methodsynopsis> + </classsynopsis> <para> The <function>mysqli_fetch_object</function> will return the current row result set as an object where the attributes of the object represent the names of the fields found within the result set. If no more rows exist in the current result set, &false; is returned. </para> + </refsect1> + <refsect1> + <title>Return values</title> + <para> + Returns an object or &false; if an error occured. + </para> &database.field-case; + </refsect1> + <refsect1> + <title>See also</title> <para> - See also <function>mysqli_fetch_array</function>, - <function>mysqli_fetch_assoc</function> and + <function>mysqli_fetch_array</function>, + <function>mysqli_fetch_assoc</function>, <function>mysqli_fetch_row</function>. </para> </refsect1> http://cvs.php.net/diff.php/phpdoc/en/reference/mysqli/functions/mysqli-fetch-row.xml?r1=1.4&r2=1.5&ty=u Index: phpdoc/en/reference/mysqli/functions/mysqli-fetch-row.xml diff -u phpdoc/en/reference/mysqli/functions/mysqli-fetch-row.xml:1.4 phpdoc/en/reference/mysqli/functions/mysqli-fetch-row.xml:1.5 --- phpdoc/en/reference/mysqli/functions/mysqli-fetch-row.xml:1.4 Thu Jul 3 04:26:08 2003 +++ phpdoc/en/reference/mysqli/functions/mysqli-fetch-row.xml Wed Jan 28 18:18:42 2004 @@ -1,16 +1,27 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.4 $ --> +<!-- $Revision: 1.5 $ --> <refentry id="function.mysqli-fetch-row"> <refnamediv> <refname>mysqli_fetch_row</refname> + <refname>result->fetch_row</refname> <refpurpose>Get a result row as an enumerated array</refpurpose> </refnamediv> <refsect1> <title>Description</title> + <para>Procedural style:</para> + <methodsynopsis> + <type>mixed</type><methodname>mysqli_fetch_row</methodname> + <methodparam><type>object</type><parameter>result</parameter></methodparam> + </methodsynopsis> + <para>Object oriented style (method):</para> + <classsynopsis> + <ooclass><classname>result</classname></ooclass> <methodsynopsis> - <type>array</type><methodname>mysqli_fetch_row</methodname> - <methodparam><type>resource</type><parameter>result</parameter></methodparam> + <type>mixed</type> + <methodname>fetch_row</methodname> + <methodparam><type>void</type><parameter></parameter></methodparam> </methodsynopsis> + </classsynopsis> <para> Returns an array that corresponds to the fetched row, or &false; if there are no more rows. </para> @@ -21,9 +32,19 @@ <function>mysqli_fetch_row</function> function will return the next row within the result set, or &false; if there are no more rows. </para> + </refsect1> + <refsect1> + <title>Return values</title> + <para> + <function>mysqli_fetch_row</function> returns an array that corresponds to the fetched row + or &false if there are no more rows in result set. + </para> + </refsect1> + <refsect1> + <title>See also</title> <para> - See also <function>mysqli_fetch_array</function>, - <function>mysqli_fetch_assoc</function> and + <function>mysqli_fetch_array</function>, + <function>mysqli_fetch_assoc</function>, <function>mysqli_fetch_object</function>. </para> </refsect1> http://cvs.php.net/diff.php/phpdoc/en/reference/mysqli/functions/mysqli-fetch.xml?r1=1.2&r2=1.3&ty=u Index: phpdoc/en/reference/mysqli/functions/mysqli-fetch.xml diff -u phpdoc/en/reference/mysqli/functions/mysqli-fetch.xml:1.2 phpdoc/en/reference/mysqli/functions/mysqli-fetch.xml:1.3 --- phpdoc/en/reference/mysqli/functions/mysqli-fetch.xml:1.2 Sat May 24 02:44:21 2003 +++ phpdoc/en/reference/mysqli/functions/mysqli-fetch.xml Wed Jan 28 18:18:42 2004 @@ -1,21 +1,74 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.2 $ --> +<!-- $Revision: 1.3 $ --> <refentry id="function.mysqli-fetch"> <refnamediv> <refname>mysqli_fetch</refname> + <refname>stmt->fetch</refname> <refpurpose> Fetch results from a prepared statement into the bound variables </refpurpose> </refnamediv> <refsect1> <title>Description</title> + <para>Procedural style:</para> + <methodsynopsis> + <type>mixed</type><methodname>mysqli_fetch</methodname> + <methodparam><type>object</type><parameter>stmt</parameter></methodparam> + </methodsynopsis> + <para>Object oriented style (method):</para> + <classsynopsis> + <ooclass><classname>stmt</classname></ooclass> <methodsynopsis> - <type>int</type><methodname>mysqli_fetch</methodname> - <methodparam><type>resource</type><parameter>stmt</parameter></methodparam> + <type>mixed</type> + <methodname>fetch</methodname> + <methodparam><type>void</type><parameter></parameter></methodparam> </methodsynopsis> - - &warn.undocumented.func; - + </classsynopsis> + <para> + <function>mysqli_fetch</function> returns row data using the variables bound by <function>mysqli_bind_result</function>. + </para> + <note> + <para> + Note that all columns must be bound by the application before calling <function>mysqli_fetch</function>. + </para> + </note> + </refsect1> + <refsect1> + <title>Return values</title> + <table> + <title>Return values</title> + <tgroup cols='2'> + <thead> + <row> + <entry>Value</entry> + <entry>Description</entry> + </row> + </thead> + <tbody> + <row> + <entry>&true;</entry> + <entry>Success. Data has been fetched</entry> + </row> + <row> + <entry>&false;</entry> + <entry>Error occured</entry> + </row> + <row> + <entry><literal>MYSQLI_NO_DATA</literal></entry> + <entry>No more rows/data exists</entry> + </row> + </tbody> + </tgroup> + </table> + </refsect1> + <refsect1> + <title>See also</title> + <para> + <function>mysqli_prepare</function>, + <function>mysqli_stmt_errno</function>, + <function>mysqli_stmt_error</function>, + <function>mysqli_bind_result</function> + </para> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc/en/reference/mysqli/functions/mysqli-field-count.xml?r1=1.4&r2=1.5&ty=u Index: phpdoc/en/reference/mysqli/functions/mysqli-field-count.xml diff -u phpdoc/en/reference/mysqli/functions/mysqli-field-count.xml:1.4 phpdoc/en/reference/mysqli/functions/mysqli-field-count.xml:1.5 --- phpdoc/en/reference/mysqli/functions/mysqli-field-count.xml:1.4 Sun May 25 15:09:28 2003 +++ phpdoc/en/reference/mysqli/functions/mysqli-field-count.xml Wed Jan 28 18:18:42 2004 @@ -1,16 +1,27 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.4 $ --> +<!-- $Revision: 1.5 $ --> <refentry id="function.mysqli-field-count"> <refnamediv> <refname>mysqli_field_count</refname> + <refname>mysql->field_cont</refname> <refpurpose>Returns the number of columns for the most recent query</refpurpose> </refnamediv> <refsect1> <title>Description</title> + <para>Procedural style:</para> + <methodsynopsis> + <type>int</type><methodname>mysqli_field_count</methodname> + <methodparam><type>object</type><parameter>link</parameter></methodparam> + </methodsynopsis> + <para>Object oriented style (method):</para> + <classsynopsis> + <ooclass><classname>mysql</classname></ooclass> <methodsynopsis> - <type>int</type><methodname>mysqli_field_count</methodname> - <methodparam><type>resource</type><parameter>link</parameter></methodparam> + <type>int</type> + <methodname>field_count</methodname> + <methodparam><type>void</type><parameter></parameter></methodparam> </methodsynopsis> + </classsynopsis> <para> Returns the number of columns for the most recent query on the connection represented by the <parameter>link</parameter> parameter. This function @@ -19,6 +30,10 @@ set or not without knowing the nature of the query. </para> </refsect1> + <refsect1> + <title>Return values</title> + <para>An integer representing the number of fields in a result set</para> + </refsect1> </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/diff.php/phpdoc/en/reference/mysqli/functions/mysqli-field-seek.xml?r1=1.2&r2=1.3&ty=u Index: phpdoc/en/reference/mysqli/functions/mysqli-field-seek.xml diff -u phpdoc/en/reference/mysqli/functions/mysqli-field-seek.xml:1.2 phpdoc/en/reference/mysqli/functions/mysqli-field-seek.xml:1.3 --- phpdoc/en/reference/mysqli/functions/mysqli-field-seek.xml:1.2 Sat May 24 02:44:21 2003 +++ phpdoc/en/reference/mysqli/functions/mysqli-field-seek.xml Wed Jan 28 18:18:42 2004 @@ -1,22 +1,43 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.2 $ --> +<!-- $Revision: 1.3 $ --> <refentry id="function.mysqli-field-seek"> <refnamediv> <refname>mysqli_field_seek</refname> + <refname>result->field_seek</refname> <refpurpose> Set result pointer to a specified field offset </refpurpose> </refnamediv> <refsect1> <title>Description</title> + <para>Procedural style:</para> <methodsynopsis> <type>int</type><methodname>mysqli_field_seek</methodname> - <methodparam><type>resource</type><parameter>link</parameter></methodparam> + <methodparam><type>object</type><parameter>result</parameter></methodparam> <methodparam><type>int</type><parameter>fieldnr</parameter></methodparam> </methodsynopsis> - - &warn.undocumented.func; - + <para>Object oriented style (method):</para> + <classsynopsis> + <ooclass><classname>result</classname></ooclass> + <methodsynopsis> + <type>int</type> + <methodname>field_seek</methodname> + <methodparam><type>int</type><parameter>fieldnr</parameter></methodparam> + </methodsynopsis> + </classsynopsis> + <para> + Sets the field cursor to the given offset. The next call to <function>mysqli_fetch_field</function> + will retrieve the field definition of the column associated with that offset. + </para> + <note> + <para>To seek to the beginning of a row, pass an offset value of zero.</para> + </note> + </refsect1> + <refsect1> + <title>Return values</title> + <para> + <function>mysqli_field_seek</function> returns previuos value of field cursor. + </para> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc/en/reference/mysqli/functions/mysqli-field-tell.xml?r1=1.2&r2=1.3&ty=u Index: phpdoc/en/reference/mysqli/functions/mysqli-field-tell.xml diff -u phpdoc/en/reference/mysqli/functions/mysqli-field-tell.xml:1.2 phpdoc/en/reference/mysqli/functions/mysqli-field-tell.xml:1.3 --- phpdoc/en/reference/mysqli/functions/mysqli-field-tell.xml:1.2 Sat May 24 02:44:21 2003 +++ phpdoc/en/reference/mysqli/functions/mysqli-field-tell.xml Wed Jan 28 18:18:42 2004 @@ -1,21 +1,46 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.2 $ --> +<!-- $Revision: 1.3 $ --> <refentry id="function.mysqli-field-tell"> <refnamediv> <refname>mysqli_field_tell</refname> + <refname>result->current_field</refname> <refpurpose> Get current field offset of a result pointer </refpurpose> </refnamediv> <refsect1> <title>Description</title> + <para>Procedural style:</para> <methodsynopsis> <type>int</type><methodname>mysqli_field_tell</methodname> - <methodparam><type>resource</type><parameter>result</parameter></methodparam> + <methodparam><type>object</type><parameter>result</parameter></methodparam> </methodsynopsis> - - &warn.undocumented.func; - + <para>Object oriented style (property):</para> + <classsynopsis> + <ooclass><classname>result</classname></ooclass> + <fieldsynopsis> + <type>int</type> + <varname>current_field</varname> + </fieldsynopsis> + </classsynopsis> + <para> + Returns the position of the field cursor used for the last + <function>mysqli_fetch_field</function> call. This value can + be used as an argument to <function>mysqli_field_seek</function>. + </para> + </refsect1> + <refsect1> + &reftitle.returnvalues; + <para> + Returns current offset of field cursor. + </para> + </refsect1> + <refsect1> + &reftitle.seealso; + <para> + <function>mysqli_fetch_field</function>, + <function>mysqli_field_seek</function> + </para> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc/en/reference/mysqli/functions/mysqli-free-result.xml?r1=1.3&r2=1.4&ty=u Index: phpdoc/en/reference/mysqli/functions/mysqli-free-result.xml diff -u phpdoc/en/reference/mysqli/functions/mysqli-free-result.xml:1.3 phpdoc/en/reference/mysqli/functions/mysqli-free-result.xml:1.4 --- phpdoc/en/reference/mysqli/functions/mysqli-free-result.xml:1.3 Fri May 23 14:07:23 2003 +++ phpdoc/en/reference/mysqli/functions/mysqli-free-result.xml Wed Jan 28 18:18:42 2004 @@ -1,22 +1,57 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.3 $ --> +<!-- $Revision: 1.4 $ --> <refentry id="function.mysqli-free-result"> <refnamediv> <refname>mysqli_free_result</refname> + <refname>result->free</refname> <refpurpose>Frees the memory associated with a result</refpurpose> </refnamediv> <refsect1> <title>Description</title> + <para>Procedural style:</para> + <methodsynopsis> + <type>void</type><methodname>mysqli_free_result</methodname> + <methodparam><type>object</type><parameter>result</parameter></methodparam> + </methodsynopsis> + <para>Object oriented style (method):</para> + <classsynopsis> + <ooclass><classname>result</classname></ooclass> <methodsynopsis> - <type>int</type><methodname>mysqli_free_result</methodname> - <methodparam><type>resource</type><parameter>result</parameter></methodparam> + <type>void</type> + <methodname>free</methodname> + <methodparam><type>void</type><parameter></parameter></methodparam> </methodsynopsis> + </classsynopsis> <para> The <function>mysqli_free_result</function> function frees the memory associated with the result represented by the - <parameter>result</parameter> parameter. + <parameter>result</parameter> parameter, which was allocated by + <function>mysqli_query</function>, <function>mysqli_store_result</function> + or <function>mysqli_use_result</function>. + </para> + <note> + <para> + You should always free your result with <function>mysqli_free_result</function>, + when your result object is not needed anymore. + </para> + </note> + </refsect1> + <refsect1> + &reftitle.returnvalues; + <para> + This function doesn't return any value. + </para> + </refsect1> + <refsect1> + &reftitle.seealso; + <para> + <function>mysqli_query</function>, + <function>mysqli_stmt_store_result</function>, + <function>mysqli_store_result</function>, + <function>mysqli_use_result</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-get-client-info.xml?r1=1.3&r2=1.4&ty=u Index: phpdoc/en/reference/mysqli/functions/mysqli-get-client-info.xml diff -u phpdoc/en/reference/mysqli/functions/mysqli-get-client-info.xml:1.3 phpdoc/en/reference/mysqli/functions/mysqli-get-client-info.xml:1.4 --- phpdoc/en/reference/mysqli/functions/mysqli-get-client-info.xml:1.3 Fri May 23 14:07:23 2003 +++ phpdoc/en/reference/mysqli/functions/mysqli-get-client-info.xml Wed Jan 28 18:18:42 2004 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.3 $ --> +<!-- $Revision: 1.4 $ --> <refentry id="function.mysqli-get-client-info"> <refnamediv> <refname>mysqli_get_client_info</refname> @@ -17,6 +17,18 @@ MySQLi extension. </para> </refsect1> + <refsect1> + &reftitle.returnvalues; + <para> + A string that represents the MySQL client library version + </para> + </refsect1> + <refsect1> + &reftitle.seealso; + <para> + <function>mysqli_get_client_version</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-get-host-info.xml?r1=1.3&r2=1.4&ty=u Index: phpdoc/en/reference/mysqli/functions/mysqli-get-host-info.xml diff -u phpdoc/en/reference/mysqli/functions/mysqli-get-host-info.xml:1.3 phpdoc/en/reference/mysqli/functions/mysqli-get-host-info.xml:1.4 --- phpdoc/en/reference/mysqli/functions/mysqli-get-host-info.xml:1.3 Fri May 23 14:07:23 2003 +++ phpdoc/en/reference/mysqli/functions/mysqli-get-host-info.xml Wed Jan 28 18:18:42 2004 @@ -1,22 +1,41 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.3 $ --> +<!-- $Revision: 1.4 $ --> <refentry id="function.mysqli-get-host-info"> <refnamediv> <refname>mysqli_get_host_info</refname> + <refname>mysqli->get_host_info</refname> <refpurpose>Returns a string representing the type of connection used</refpurpose> </refnamediv> <refsect1> <title>Description</title> - <methodsynopsis> - <type>string</type><methodname>mysqli_get_host_info</methodname> - <methodparam><type>resource</type><parameter>link</parameter></methodparam> - </methodsynopsis> + <para>Procdural style:</para> + <methodsynopsis> + <type>string</type><methodname>mysqli_get_host_info</methodname> + <methodparam><type>object</type><parameter>link</parameter></methodparam> + </methodsynopsis> + <para>Object oriented style (property):</para> + <classsynopsis> + <ooclass><classname>mysqli</classname></ooclass> + <fieldsynopsis><type>string</type><varname>host_info</varname></fieldsynopsis> + </classsynopsis> <para> The <function>mysqli_get_host_info</function> function returns a string describing the connection represented by the <parameter>link</parameter> parameter is using (including the server host name). </para> </refsect1> + <refsect1> + &reftitle.returnvalues; + <para> + A character string representing the server hostname and the connection type. + </para> + </refsect1> + <refsect1> + &reftitle.seealso; + <para> + <function>mysqli_get_proto_info</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-get-proto-info.xml?r1=1.3&r2=1.4&ty=u Index: phpdoc/en/reference/mysqli/functions/mysqli-get-proto-info.xml diff -u phpdoc/en/reference/mysqli/functions/mysqli-get-proto-info.xml:1.3 phpdoc/en/reference/mysqli/functions/mysqli-get-proto-info.xml:1.4 --- phpdoc/en/reference/mysqli/functions/mysqli-get-proto-info.xml:1.3 Fri May 23 14:07:23 2003 +++ phpdoc/en/reference/mysqli/functions/mysqli-get-proto-info.xml Wed Jan 28 18:18:42 2004 @@ -1,21 +1,40 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.3 $ --> +<!-- $Revision: 1.4 $ --> <refentry id="function.mysqli-get-proto-info"> <refnamediv> <refname>mysqli_get_proto_info</refname> + <refname>mysqli->protocol_version</refname> <refpurpose>Returns the version of the MySQL protocol used</refpurpose> </refnamediv> <refsect1> <title>Description</title> - <methodsynopsis> - <type>int</type><methodname>mysqli_get_proto_info</methodname> - <methodparam><type>resource</type><parameter>link</parameter></methodparam> - </methodsynopsis> + <para>Procedural style:</para> + <methodsynopsis> + <type>int</type><methodname>mysqli_get_proto_info</methodname> + <methodparam><type>object</type><parameter>link</parameter></methodparam> + </methodsynopsis> + <para>Object oriented style (property):</para> + <classsynopsis> + <ooclass><classname>mysqli</classname></ooclass> + <fieldsynopsis><type>string</type><varname>protocol_version</varname></fieldsynopsis> + </classsynopsis> <para> Returns an integer representing the MySQL protocol version used by the connection represented by the <parameter>link</parameter> parameter. </para> </refsect1> + <refsect1> + &reftitle.returnvalues; + <para> + Returns an integer representing the protcol version. + </para> + </refsect1> + <refsect1> + &reftitle.seealso; + <para> + <function>mysqli_get_host_info</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-get-server-info.xml?r1=1.3&r2=1.4&ty=u Index: phpdoc/en/reference/mysqli/functions/mysqli-get-server-info.xml diff -u phpdoc/en/reference/mysqli/functions/mysqli-get-server-info.xml:1.3 phpdoc/en/reference/mysqli/functions/mysqli-get-server-info.xml:1.4 --- phpdoc/en/reference/mysqli/functions/mysqli-get-server-info.xml:1.3 Fri May 23 14:07:23 2003 +++ phpdoc/en/reference/mysqli/functions/mysqli-get-server-info.xml Wed Jan 28 18:18:42 2004 @@ -1,22 +1,41 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.3 $ --> +<!-- $Revision: 1.4 $ --> <refentry id="function.mysqli-get-server-info"> <refnamediv> <refname>mysqli_get_server_info</refname> + <refname>mysqli->server_info</refname> <refpurpose>Returns the version of the MySQL server</refpurpose> </refnamediv> <refsect1> <title>Description</title> - <methodsynopsis> - <type>string</type><methodname>mysqli_get_server_info</methodname> - <methodparam><type>resource</type><parameter>link</parameter></methodparam> - </methodsynopsis> + <para>Procedural style:</para> + <methodsynopsis> + <type>string</type><methodname>mysqli_get_server_info</methodname> + <methodparam><type>object</type><parameter>link</parameter></methodparam> + </methodsynopsis> + <para>Object oriented style (property):</para> + <classsynopsis> + <ooclass><classname>mysqli</classname></ooclass> + <fieldsynopsis><type>string</type><varname>server_info</varname></fieldsynopsis> + </classsynopsis> <para> Returns a string representing the version of the MySQL server that the MySQLi extension is connected to (represented by the <parameter>link</parameter> parameter). </para> </refsect1> + <refsect1> + &reftitle.returnvalues; + <para> + A character string representing the server version. + </para> + </refsect1> + <refsect1> + &reftitle.seealso; + <para> + <function>mysqli_get_server_version</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-get-server-version.xml?r1=1.3&r2=1.4&ty=u Index: phpdoc/en/reference/mysqli/functions/mysqli-get-server-version.xml diff -u phpdoc/en/reference/mysqli/functions/mysqli-get-server-version.xml:1.3 phpdoc/en/reference/mysqli/functions/mysqli-get-server-version.xml:1.4 --- phpdoc/en/reference/mysqli/functions/mysqli-get-server-version.xml:1.3 Fri May 23 14:07:23 2003 +++ phpdoc/en/reference/mysqli/functions/mysqli-get-server-version.xml Wed Jan 28 18:18:42 2004 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.3 $ --> +<!-- $Revision: 1.4 $ --> <refentry id="function.mysqli-get-server-version"> <refnamediv> <refname>mysqli_get_server_version</refname> @@ -7,18 +7,39 @@ </refnamediv> <refsect1> <title>Description</title> + <para>Procedural style:</para> <methodsynopsis> <type>int</type><methodname>mysqli_get_server_version</methodname> - <methodparam><type>resource</type><parameter>link</parameter></methodparam> + <methodparam><type>object</type><parameter>link</parameter></methodparam> </methodsynopsis> + <para>Object oriented style (property):</para> + <classsynopsis> + <ooclass><classname>mysqli</classname></ooclass> + <fieldsynopsis><type>int</type><varname>server_version</varname></fieldsynopsis> + </classsynopsis> <para> The <function>mysqli_get_server_version</function> function returns the version of the server connected to (represented by the - <parameter>link</parameter> parameter) as an integer. The form of this - version number is main_version * 10000 + minor_version * 100 + sub_version + <parameter>link</parameter> parameter) as an integer. + </para> + <para> + The form of this version number is + <literal>main_version * 10000 + minor_version * 100 + sub_version</literal> (i.e. version 4.1.0 is 40100). </para> </refsect1> + <refsect1> + &reftitle.returnvalues; + <para> + An integer representing the server version. + </para> + </refsect1> + <refsect1> + &reftitle.seealso; + <para> + <function>mysqli_get_server_info</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-info.xml?r1=1.3&r2=1.4&ty=u Index: phpdoc/en/reference/mysqli/functions/mysqli-info.xml diff -u phpdoc/en/reference/mysqli/functions/mysqli-info.xml:1.3 phpdoc/en/reference/mysqli/functions/mysqli-info.xml:1.4 --- phpdoc/en/reference/mysqli/functions/mysqli-info.xml:1.3 Fri May 23 19:58:23 2003 +++ phpdoc/en/reference/mysqli/functions/mysqli-info.xml Wed Jan 28 18:18:42 2004 @@ -1,16 +1,23 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.3 $ --> +<!-- $Revision: 1.4 $ --> <refentry id="function.mysqli-info"> <refnamediv> <refname>mysqli_info</refname> + <refname>mysqli->info</refname> <refpurpose>Retrieves information about the most recently executed query</refpurpose> </refnamediv> <refsect1> <title>Description</title> + <para>Procedural style:</para> <methodsynopsis> <type>string</type><methodname>mysqli_info</methodname> - <methodparam><type>resource</type><parameter>link</parameter></methodparam> + <methodparam><type>object</type><parameter>link</parameter></methodparam> </methodsynopsis> + <para>Object oriented style (property)</para> + <classsynopsis> + <ooclass><classname>mysqli</classname></ooclass> + <fieldsynopsis><type>string</type><varname>info</varname></fieldsynopsis> + </classsynopsis> <para> The <function>mysqli_info</function> function returns a string providing information about the last query executed. The nature of this string is @@ -54,10 +61,24 @@ <note> <para> Queries which do not fall into one of the above formats are not supported. - In these situations, <function>mysqli_info</function> will return &false; + In these situations, <function>mysqli_info</function> will return an empty string. </para> </note> </refsect1> + <refsect1> + &reftitle.returnvalues; + <para> + A character string representing additional information about the most recently executed query. + </para> + </refsect1> + <refsect1> + &reftitle.seealso; + <para> + <function>mysqli_affected_rows</function>, + <function>mysqli_warning_count</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-init.xml?r1=1.2&r2=1.3&ty=u Index: phpdoc/en/reference/mysqli/functions/mysqli-init.xml diff -u phpdoc/en/reference/mysqli/functions/mysqli-init.xml:1.2 phpdoc/en/reference/mysqli/functions/mysqli-init.xml:1.3 --- phpdoc/en/reference/mysqli/functions/mysqli-init.xml:1.2 Thu Jun 12 03:49:15 2003 +++ phpdoc/en/reference/mysqli/functions/mysqli-init.xml Wed Jan 28 18:18:42 2004 @@ -1,21 +1,43 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.2 $ --> +<!-- $Revision: 1.3 $ --> <refentry id="function.mysqli-init"> <refnamediv> <refname>mysqli_init</refname> <refpurpose> - Initializes MySQLi and returns a resource for use with mysqli_real_connect + Initializes MySQLi and returns an object for use with mysqli_real_connect </refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> - <type>resource</type><methodname>mysqli_init</methodname> + <type>object</type><methodname>mysqli_init</methodname> <void/> </methodsynopsis> - - &warn.undocumented.func; - + <para> + Allocates or initializes a MYSQL object suitable for + <function>mysqli_options</function> and <function>mysqli_real_connect</function>. + </para> + <note> + <para> + Any subsequent calls to any mysqli function (except <function>mysqli_options</function>) + will fail until <function>mysqli_real_connect</function> was called. + </para> + </note> + </refsect1> + <refsect1> + &reftitle.returnvalues; + <para> + Returns an object. + </para> + </refsect1> + <refsect1> + &reftitle.seealso; + <para> + <function>mysqli_options</function>, + <function>mysqli_close</function>, + <function>mysqli_real_connect</function>, + <function>mysqli_connect</function> + </para> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc/en/reference/mysqli/functions/mysqli-insert-id.xml?r1=1.3&r2=1.4&ty=u Index: phpdoc/en/reference/mysqli/functions/mysqli-insert-id.xml diff -u phpdoc/en/reference/mysqli/functions/mysqli-insert-id.xml:1.3 phpdoc/en/reference/mysqli/functions/mysqli-insert-id.xml:1.4 --- phpdoc/en/reference/mysqli/functions/mysqli-insert-id.xml:1.3 Fri May 23 14:07:24 2003 +++ phpdoc/en/reference/mysqli/functions/mysqli-insert-id.xml Wed Jan 28 18:18:42 2004 @@ -1,16 +1,23 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.3 $ --> +<!-- $Revision: 1.4 $ --> <refentry id="function.mysqli-insert-id"> <refnamediv> <refname>mysqli_insert_id</refname> + <refname>mysqli->insert_id</refname> <refpurpose>Returns the auto generated id used in the last query</refpurpose> </refnamediv> <refsect1> <title>Description</title> + <para>Procedural style:</para> <methodsynopsis> <type>mixed</type><methodname>mysqli_insert_id</methodname> - <methodparam><type>resource</type><parameter>link</parameter></methodparam> + <methodparam><type>object</type><parameter>link</parameter></methodparam> </methodsynopsis> + <para>Object oriented style (property):</para> + <classsynopsis> + <ooclass><classname>mysqli</classname></ooclass> + <fieldsynopsis><type>mixed</type><varname>insert_id</varname></fieldsynopsis> + </classsynopsis> <para> The <function>mysqli_insert_id</function> function returns the ID generated by a query on a table with a column having the AUTO_INCREMENT attribute. If @@ -26,7 +33,22 @@ </para> </note> </refsect1> - </refentry> + <refsect1> + &reftitle.returnvalues; + <para> + The value of the <literal>AUTO_INCREMENT</literal> field that was updated + by the previous query. Returns zero if there was no previous query on the + connection or if the query did not update an <literal>AUTO_INCREMENT</literal> + value. + </para> + <note> + <para> + If the number is greater than maximal int value, <function>mysqli_insert_id</function> + will return a string. + </para> + </note> + </refsect1> + </refentry> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/diff.php/phpdoc/en/reference/mysqli/functions/mysqli-kill.xml?r1=1.4&r2=1.5&ty=u Index: phpdoc/en/reference/mysqli/functions/mysqli-kill.xml diff -u phpdoc/en/reference/mysqli/functions/mysqli-kill.xml:1.4 phpdoc/en/reference/mysqli/functions/mysqli-kill.xml:1.5 --- phpdoc/en/reference/mysqli/functions/mysqli-kill.xml:1.4 Sun May 25 15:09:28 2003 +++ phpdoc/en/reference/mysqli/functions/mysqli-kill.xml Wed Jan 28 18:18:42 2004 @@ -1,22 +1,49 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.4 $ --> +<!-- $Revision: 1.5 $ --> <refentry id="function.mysqli-kill"> <refnamediv> <refname>mysqli_kill</refname> + <refname>mysqli->kill</refname> <refpurpose>Asks the server to kill a MySQL thread</refpurpose> </refnamediv> <refsect1> <title>Description</title> + <para>Procedural style:</para> <methodsynopsis> <type>bool</type><methodname>mysqli_kill</methodname> - <methodparam><type>resource</type><parameter>link</parameter></methodparam> + <methodparam><type>object</type><parameter>link</parameter></methodparam> <methodparam><type>int</type><parameter>processid</parameter></methodparam> </methodsynopsis> - <para> + <para>Object oriented style (method)</para> + <classsynopsis> + <ooclass><classname>mysqli</classname></ooclass> + <methodsynopsis> + <type>bool</type> + <methodname>kill</methodname> + <methodparam><type>int</type><parameter>processid</parameter></methodparam> + </methodsynopsis> + </classsynopsis> + <para> This function is used to ask the server to kill a MySQL thread specified by the <parameter>processid</parameter> parameter. This value must be retrieved by calling the <function>mysqli_thread_id</function> function. </para> + <note> + <para> + To stop a running query you should use the SQL command + <literal>KILL QUERY processid</literal>. + </para> + </note> + </refsect1> + <refsect1> + &reftitle.returnvalues; + <para>&return.success;</para> + </refsect1> + <refsect1> + &reftitle.seealso; + <para> + <function>mysqli_thread_id</function> + </para> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc/en/reference/mysqli/functions/mysqli-num-fields.xml?r1=1.2&r2=1.3&ty=u Index: phpdoc/en/reference/mysqli/functions/mysqli-num-fields.xml diff -u phpdoc/en/reference/mysqli/functions/mysqli-num-fields.xml:1.2 phpdoc/en/reference/mysqli/functions/mysqli-num-fields.xml:1.3 --- phpdoc/en/reference/mysqli/functions/mysqli-num-fields.xml:1.2 Sat May 24 02:44:21 2003 +++ phpdoc/en/reference/mysqli/functions/mysqli-num-fields.xml Wed Jan 28 18:18:42 2004 @@ -1,21 +1,38 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.2 $ --> +<!-- $Revision: 1.3 $ --> <refentry id="function.mysqli-num-fields"> <refnamediv> <refname>mysqli_num_fields</refname> + <refname>result->num_fields</refname> <refpurpose> Get the number of fields in a result </refpurpose> </refnamediv> <refsect1> <title>Description</title> + <para>Procedural style:</para> <methodsynopsis> <type>int</type><methodname>mysqli_num_fields</methodname> - <methodparam><type>resource</type><parameter>result</parameter></methodparam> + <methodparam><type>object</type><parameter>result</parameter></methodparam> </methodsynopsis> - - &warn.undocumented.func; - + <para>Object oriented style (property):</para> + <classsynopsis> + <ooclass><classname>mysqli</classname></ooclass> + <fieldsynopsis><type>int</type><varname>field_count</varname></fieldsynopsis> + </classsynopsis> + <para> + <function>mysqli_num_fields</function> returns the number of fields from specified result set. + </para> + </refsect1> + <refsect1> + &reftitle.returnvalues; + <para>The number of fields from a result set</para> + </refsect1> + <refsect1> + &reftitle.seealso; + <para> + <function>mysqli_fetch_field</function> + </para> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc/en/reference/mysqli/functions/mysqli-num-rows.xml?r1=1.3&r2=1.4&ty=u Index: phpdoc/en/reference/mysqli/functions/mysqli-num-rows.xml diff -u phpdoc/en/reference/mysqli/functions/mysqli-num-rows.xml:1.3 phpdoc/en/reference/mysqli/functions/mysqli-num-rows.xml:1.4 --- phpdoc/en/reference/mysqli/functions/mysqli-num-rows.xml:1.3 Tue Jun 10 13:18:06 2003 +++ phpdoc/en/reference/mysqli/functions/mysqli-num-rows.xml Wed Jan 28 18:18:42 2004 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.3 $ --> +<!-- $Revision: 1.4 $ --> <refentry id="function.mysqli-num-rows"> <refnamediv> <refname>mysqli_num_rows</refname> @@ -9,13 +9,47 @@ </refnamediv> <refsect1> <title>Description</title> + <para>Procedural style:</para> <methodsynopsis> - <type>int</type><methodname>mysqli_num_rows</methodname> - <methodparam><type>resource</type><parameter>result</parameter></methodparam> + <type>mixed</type><methodname>mysqli_num_rows</methodname> + <methodparam><type>object</type><parameter>result</parameter></methodparam> </methodsynopsis> - - &warn.undocumented.func; - + <para>Object oriented style (property):</para> + <classsynopsis> + <ooclass><classname>mysqli</classname></ooclass> + <fieldsynopsis><type>mixed</type><varname>num_rows</varname></fieldsynopsis> + </classsynopsis> + <para> + Returns the number of rows in the result set. + </para> + <para> + The use of <function>mysqli_num_rows</function> depends on whether you use + buffered or unbuffered result sets. + In case you use unbuffered resultsets <function>mysqli_num_rows</function> + will not correct the correct number of rows until all the rows in the result + have been retrieved. + </para> + </refsect1> + <refsect1> + &reftitle.returnvalues; + <para> + Returns number of rows in the result set. + </para> + <note> + <para> + If the number of rows is greater than maximal int value, the number + will be returned as a string. + </para> + </note> + </refsect1> + <refsect1> + &reftitle.seealso; + <para> + <function>mysqli_affected_rows</function> + <function>mysqli_store_result</function> + <function>mysqli_use_result</function> + <function>mysqli_query</function> + </para> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc/en/reference/mysqli/functions/mysqli-options.xml?r1=1.2&r2=1.3&ty=u Index: phpdoc/en/reference/mysqli/functions/mysqli-options.xml diff -u phpdoc/en/reference/mysqli/functions/mysqli-options.xml:1.2 phpdoc/en/reference/mysqli/functions/mysqli-options.xml:1.3 --- phpdoc/en/reference/mysqli/functions/mysqli-options.xml:1.2 Sun May 25 14:02:46 2003 +++ phpdoc/en/reference/mysqli/functions/mysqli-options.xml Wed Jan 28 18:18:42 2004 @@ -1,21 +1,99 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.2 $ --> +<!-- $Revision: 1.3 $ --> <refentry id="function.mysqli-options"> <refnamediv> <refname>mysqli_options</refname> + <refname>mysqli->options</refname> <refpurpose>set options</refpurpose> </refnamediv> <refsect1> <title>Description</title> + <para>Procedural style:</para> <methodsynopsis> <type>bool</type><methodname>mysqli_options</methodname> - <methodparam><type>resource</type><parameter>link</parameter></methodparam> - <methodparam><type>int</type><parameter>flags</parameter></methodparam> - <methodparam><type>mixed</type><parameter>values</parameter></methodparam> + <methodparam><type>object</type><parameter>link</parameter></methodparam> + <methodparam><type>int</type><parameter>option</parameter></methodparam> + <methodparam><type>mixed</type><parameter>value</parameter></methodparam> </methodsynopsis> - - &warn.undocumented.func; - + <para>Object oriented style (method)</para> + <classsynopsis> + <ooclass><classname>mysqli</classname></ooclass> + <methodsynopsis> + <type>bool</type> + <methodname>options</methodname> + <methodparam><type>int</type><parameter>option</parameter></methodparam> + <methodparam><type>mixed</type><parameter>value</parameter></methodparam> + </methodsynopsis> + </classsynopsis> + <para> + <function>mysqli_options</function> can be used to set extra connect options + and affect behavior for a connection. + </para> + <para> + This function may be called multiple times to set several options. + </para> + <para> + <function>mysqli_options</function> should be called after <function>mysqli_init</function> + and before <function>mysqli_real_connect</function>. + </para> + <para> + The parameter <parameter>option</parameter> is the option that you want to set, + the <parameter>value</parameter> is the value for the option. + The parameter <parameter>option</parameter> can be one of the following values: + <table> + <title>Valid options</title> + <tgroup cols='2'> + <thead> + <row> + <entry>Name</entry> + <entry>Description</entry> + </row> + </thead> + <tbody> + <row> + <entry><constant>MYSQLI_OPT_CONNECT_TIMEOUT</constant></entry> + <entry>connection timeout in seconds</entry> + </row> + <row> + <entry><constant>MYSQLI_OPT_COMPRESS</constant></entry> + <entry>use compression protocol</entry> + </row> + <row> + <entry><constant>MYSQLI_OPT_LOCAL_INFILE</constant></entry> + <entry>enable/disable use of <literal>LOAD LOCAL INFILE</literal></entry> + </row> + <row> + <entry><constant>MYSQLI_INIT_CMD</constant></entry> + <entry>command to execute after when connecting to MySQL server</entry> + </row> + <row> + <entry><constant>MYSQLI_READ_DEFAULT_FILE</constant></entry> + <entry> + Read options from named option file instead of <filename>my.cnf</filename> + </entry> + </row> + <row> + <entry><constant>MYSQLI_READ_DEFAULT_GROUP</constant></entry> + <entry> + Read options from the named group from <filename>my.cnf</filename> + or the file specified with <constant>MYSQL_READ_DEFAULT_FILE</constant>. + </entry> + </row> + </tbody> + </tgroup> + </table> + </para> + </refsect1> + <refsect1> + &reftitle.returnvalues; + <para>&return.success;</para> + </refsect1> + <refsect1> + &reftitle.seealso; + <para> + <function>mysqli_init</function>, + <function>mysqli_real_connect</function> + </para> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc/en/reference/mysqli/functions/mysqli-param-count.xml?r1=1.3&r2=1.4&ty=u Index: phpdoc/en/reference/mysqli/functions/mysqli-param-count.xml diff -u phpdoc/en/reference/mysqli/functions/mysqli-param-count.xml:1.3 phpdoc/en/reference/mysqli/functions/mysqli-param-count.xml:1.4 --- phpdoc/en/reference/mysqli/functions/mysqli-param-count.xml:1.3 Sun May 25 14:02:46 2003 +++ phpdoc/en/reference/mysqli/functions/mysqli-param-count.xml Wed Jan 28 18:18:42 2004 @@ -1,19 +1,38 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.3 $ --> +<!-- $Revision: 1.4 $ --> <refentry id="function.mysqli-param-count"> <refnamediv> <refname>mysqli_param_count</refname> + <refname>stmt->param_count</refname> <refpurpose>Returns the number of parameter for the given statement</refpurpose> </refnamediv> <refsect1> <title>Description</title> + <para>Procedural style:</para> <methodsynopsis> <type>int</type><methodname>mysqli_param_count</methodname> - <methodparam><type>resource</type><parameter>stmt</parameter></methodparam> + <methodparam><type>object</type><parameter>stmt</parameter></methodparam> </methodsynopsis> - - &warn.undocumented.func; - + <para>Object oriented style (property):</para> + <classsynopsis> + <ooclass><classname>stmt</classname></ooclass> + <fieldsynopsis><type>int</type><varname>param_count</varname></fieldsynopsis> + </classsynopsis> + <para> + <function>mysqli_param_count</function> returns the number of parameter + markers present in the prepared statement. + </para> + </refsect1> + &reftitle.returnvalues; + <para> + returns an integer representing the number of parameters. + </para> + </refsect1> + <refsect1> + &reftitle.seealso; + <para> + <function>mysqli_prepare</function> + </para> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc/en/reference/mysqli/functions/mysqli-ping.xml?r1=1.2&r2=1.3&ty=u Index: phpdoc/en/reference/mysqli/functions/mysqli-ping.xml diff -u phpdoc/en/reference/mysqli/functions/mysqli-ping.xml:1.2 phpdoc/en/reference/mysqli/functions/mysqli-ping.xml:1.3 --- phpdoc/en/reference/mysqli/functions/mysqli-ping.xml:1.2 Sat May 24 02:44:21 2003 +++ phpdoc/en/reference/mysqli/functions/mysqli-ping.xml Wed Jan 28 18:18:42 2004 @@ -1,21 +1,41 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.2 $ --> +<!-- $Revision: 1.3 $ --> <refentry id="function.mysqli-ping"> <refnamediv> <refname>mysqli_ping</refname> + <refname>mysqli->ping</refname> <refpurpose> - Ping a server connection, or reconnect if there is no connection + Pings a server connection, or tries to reconnect if the connection has gone down. </refpurpose> </refnamediv> <refsect1> <title>Description</title> + <para>Procedural style:</para> + <methodsynopsis> + <type>int</type><methodname>mysqli_ping</methodname> + <methodparam><type>object</type><parameter>link</parameter></methodparam> + </methodsynopsis> + <para>Object oriented style (method):</para> + <classsynopsis> + <ooclass><classname>mysqli</classname></ooclass> <methodsynopsis> - <type>int</type><methodname>mysqli_ping</methodname> - <methodparam><type>resource</type><parameter>link</parameter></methodparam> + <type>int</type><methodname>ping</methodname> + <methodparam><type>void</type><parameter></parameter></methodparam> </methodsynopsis> - - &warn.undocumented.func; - + </classsynopsis> + <para> + Checks whether the connection to the server is working. If it has gone + down, an automatic reconnection is attempted. + </para> + <para> + This function can be used by clients that remain idle for a long while, + to check whether the server has closed the connection and reconnect if + necessary. + </para> + <para> + <function>mysqli_ping</function> returns 0 if the connection is alive + and non-zero value if an error has occured. + </para> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc/en/reference/mysqli/functions/mysqli-prepare.xml?r1=1.2&r2=1.3&ty=u Index: phpdoc/en/reference/mysqli/functions/mysqli-prepare.xml diff -u phpdoc/en/reference/mysqli/functions/mysqli-prepare.xml:1.2 phpdoc/en/reference/mysqli/functions/mysqli-prepare.xml:1.3 --- phpdoc/en/reference/mysqli/functions/mysqli-prepare.xml:1.2 Sat May 24 02:44:21 2003 +++ phpdoc/en/reference/mysqli/functions/mysqli-prepare.xml Wed Jan 28 18:18:42 2004 @@ -1,22 +1,84 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.2 $ --> +<!-- $Revision: 1.3 $ --> <refentry id="function.mysqli-prepare"> <refnamediv> <refname>mysqli_prepare</refname> + <refname>stmt->prepare</refname> <refpurpose> Prepare a SQL statement for execution </refpurpose> </refnamediv> <refsect1> <title>Description</title> + <para>Procedure style:</para> <methodsynopsis> - <type>resource</type><methodname>mysqli_prepare</methodname> - <methodparam><type>resource</type><parameter>link</parameter></methodparam> + <type>mixed</type><methodname>mysqli_prepare</methodname> + <methodparam><type>object</type><parameter>link</parameter></methodparam> <methodparam><type>string</type><parameter>query</parameter></methodparam> </methodsynopsis> - - &warn.undocumented.func; - + <para>Object oriented style (method)</para> + <classsynopsis> + <ooclass><classname>stmt</classname></ooclass> + <methodsynopsis> + <type>mixed</type> + <methodname>prepare</methodname> + <methodparam><type>string</type><parameter>query</parameter></methodparam> + </methodsynopsis> + </classsynopsis> + <para> + <function>mysqli_prepare</function> prepares the SQL query pointed to by the + null-terminated string query, and returns a statement handle to be used for + further operations on the statement. The query must consist of a single SQL statement. + </para> + <note> + <para> + You should not add a terminating semicolon or <literal>\g</literal> + to the statement. + </para> + </note> + <para> + The parameter <parameter>query</parameter> can include one or more parameter markers + in the SQL statement by embedding question mark (<literal>?</literal>) characters + at the appropriate positions. + </para> + <note> + <para> + The markers are legal only in certain places in SQL statements. + For example, they are allowed in the VALUES() list of an INSERT statement + (to specify column values for a row), or in a comparison with a column in + a WHERE clause to specify a comparison value. + </para> + <para> + However, they are not allowed for identifiers (such as table or column names), + in the select list that names the columns to be returned by a SELECT statement), + or to specify both operands of a binary operator such as the <literal>=</literal> + equal sign. The latter restriction is necessary because it would be impossible + to determine the parameter type. In general, parameters are legal only in Data + Manipulation Languange (DML) statements, and not in Data Defination Language + (DDL) statements. + </para> + </note> + <para> + The parameter markers must be bound to application variables using + <function>mysqli_bind_param</function> and/or <function>mysqli_bind_result</function> + before executing the statement or fetching rows. + </para> + </refsect1> + <refsect1> + &reftitle.returnvalues; + <para> + <function>mysqli_prepare</function> returns a statement object or &false; if an error occured. + </para> + </refsect1> + <refsect1> + &reftitle.seealso; + <para> + <function>mysqli_execute</function> + <function>mysqli_fetch</function> + <function>mysqli_bind_param</function> + <function>mysqli_bind_result</function> + <function>mysqli_stmt_close</function> + </para> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc/en/reference/mysqli/functions/mysqli-query.xml?r1=1.4&r2=1.5&ty=u Index: phpdoc/en/reference/mysqli/functions/mysqli-query.xml diff -u phpdoc/en/reference/mysqli/functions/mysqli-query.xml:1.4 phpdoc/en/reference/mysqli/functions/mysqli-query.xml:1.5 --- phpdoc/en/reference/mysqli/functions/mysqli-query.xml:1.4 Sun May 25 15:09:28 2003 +++ phpdoc/en/reference/mysqli/functions/mysqli-query.xml Wed Jan 28 18:18:42 2004 @@ -1,30 +1,66 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.4 $ --> +<!-- $Revision: 1.5 $ --> <refentry id="function.mysqli-query"> <refnamediv> <refname>mysqli_query</refname> + <refname>mysqli->query</refname> <refpurpose>Performs a query on the database</refpurpose> </refnamediv> <refsect1> <title>Description</title> + <para>Procedural style:</para> + <methodsynopsis> + <type>mixed</type><methodname>mysqli_query</methodname> + <methodparam><type>object</type><parameter>link</parameter></methodparam> + <methodparam><type>string</type><parameter>query</parameter></methodparam> + <methodparam choice='opt'><type>int</type><parameter>resultmode</parameter></methodparam> + </methodsynopsis> + <para>Object oriented style (method):</para> + <classsynopsis> + <ooclass><classname>mysqli</classname></ooclass> <methodsynopsis> - <type>resource</type><methodname>mysqli_query</methodname> - <methodparam><type>resource</type><parameter>link</parameter></methodparam> + <type>mixed</type> + <methodname>query</methodname> <methodparam><type>string</type><parameter>query</parameter></methodparam> - <methodparam choice='opt'><type>int</type><parameter>resultmode</parameter></methodparam> </methodsynopsis> + </classsynopsis> <para> The <function>mysqli_query</function> function is used to simplify the act of performing a query against the database represented by the - <parameter>link</parameter> parameter. Functionally, using this + <parameter>link</parameter> parameter. + </para> + <para> + Functionally, using this function is identical to calling <function>mysqli_real_query</function> followed either by <function>mysqli_use_result</function> or <function>mysqli_store_result</function> where <parameter>query</parameter> is the query string itself and <parameter>resultmode</parameter> is - either the constant MYSQLI_USE_RESULT or MYSQLI_STORE_RESULT depending + either the constant <literal>MYSQLI_USE_RESULT</literal> or + <literal>MYSQLI_STORE_RESULT</literal> depending on the desired behavior. By default, if the - <parameter>resultmode</parameter> is not provided MYSQLI_STORE_RESULT - is used. + <parameter>resultmode</parameter> is not provided + <literal>MYSQLI_STORE_RESULT</literal> is used. + </para> + <para> + If you execute <function>mysqli_query</function> with <parameter>resultmode</parameter> + <literal>MYSQLI_USE_RESULT</literal> all subsequent calls will return error + <literal>Commands out of sync</literal> unless you call <function>mysqli_free_result</function>. + </para> + </refsect1> + <refsect1> + <title>Return values</title> + <para> + &return.success; For <literal>SELECT, SHOW, DESCRIBE</literal> or + <literal>EXPLAIN</literal> <function>mysqli_query</function> will return + a result object. + </para> + </refsect1> + <refsect1> + <title>See also</title> + <para> + <function>mysqli_real_query</function>, + <function>mysqli_multi_query</function>, + <function>mysqli_free_result</function> </para> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc/en/reference/mysqli/functions/mysqli-real-connect.xml?r1=1.3&r2=1.4&ty=u Index: phpdoc/en/reference/mysqli/functions/mysqli-real-connect.xml diff -u phpdoc/en/reference/mysqli/functions/mysqli-real-connect.xml:1.3 phpdoc/en/reference/mysqli/functions/mysqli-real-connect.xml:1.4 --- phpdoc/en/reference/mysqli/functions/mysqli-real-connect.xml:1.3 Sun May 25 14:02:46 2003 +++ phpdoc/en/reference/mysqli/functions/mysqli-real-connect.xml Wed Jan 28 18:18:42 2004 @@ -1,28 +1,119 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.3 $ --> +<!-- $Revision: 1.4 $ --> <refentry id="function.mysqli-real-connect"> <refnamediv> <refname>mysqli_real_connect</refname> + <refname>mysqli->real_connect</refname> <refpurpose>Opens a connection to a mysql server</refpurpose> </refnamediv> <refsect1> <title>Description</title> + <para>Procedural style</para> <methodsynopsis> <type>bool</type><methodname>mysqli_real_connect</methodname> - <methodparam><type>resource</type><parameter>link</parameter></methodparam> + <methodparam><type>object</type><parameter>link</parameter></methodparam> <methodparam choice='opt'><type>string</type><parameter>hostname</parameter></methodparam> <methodparam choice='opt'><type>string</type><parameter>username</parameter></methodparam> <methodparam choice='opt'><type>string</type><parameter>passwd</parameter></methodparam> <methodparam choice='opt'><type>string</type><parameter>dbname</parameter></methodparam> <methodparam choice='opt'><type>int</type><parameter>port</parameter></methodparam> <methodparam choice='opt'><type>string</type><parameter>socket</parameter></methodparam> + <methodparam choice='opt'><type>int</type><parameter>flags</parameter></methodparam> </methodsynopsis> - - &warn.undocumented.func; - + <para>Object oriented style (method)</para> + <classsynopsis> + <ooclass><classname>mysqli</classname></ooclass> + <methodsynopsis> + <type>bool</type> + <methodname>real_connect</methodname> + <methodparam choice='opt'><type>string</type><parameter>hostname</parameter></methodparam> + <methodparam choice='opt'><type>string</type><parameter>username</parameter></methodparam> + <methodparam choice='opt'><type>string</type><parameter>passwd</parameter></methodparam> + <methodparam choice='opt'><type>string</type><parameter>dbname</parameter></methodparam> + <methodparam choice='opt'><type>int</type><parameter>port</parameter></methodparam> + <methodparam choice='opt'><type>string</type><parameter>socket</parameter></methodparam> + <methodparam choice='opt'><type>int</type><parameter>flags</parameter></methodparam> + </methodsynopsis> + </classsynopsis> + <para> + mysql_real_connect() attempts to establish a connection to a MySQL database engine running on host. + </para> + <para> + This function differs from <function>mysqli_connect</function>: + </para> + <itemizedlist> + <listitem> + <para> + <function>mysqli_real_connect</function> needs a valid object which has to be created by function + <function>mysqli_init</function> + </para> + </listitem> + <listitem> + <para> + With function <function>mysqli_options</function> you can set various options for connection. + </para> + </listitem> + <listitem> + <para> + With the parameter <parameter>flags</parameter> you can set diffrent connection options: + </para> + <table> + <title>Supported flags</title> + <tgroup cols='2'> + <thead> + <row> + <entry>Name</entry> + <entry>Description</entry> + </row> + </thead> + <tbody> + <row> + <entry><literal>MYSQLI_CLIENT_COMPRESS</literal></entry> + <entry>Use compression protocol</entry> + </row> + <row> + <entry><literal>MYSQLI_CLIENT_FOUND_ROWS</literal></entry> + <entry>return number of matched rows, not the number of affected rows</entry> + </row> + <row> + <entry><literal>MYSQLI_CLIENT_IGNORE_SPACE</literal></entry> + <entry>Allow spaces after function names. Makes all function names reserved words.</entry> + </row> + <row> + <entry><literal>MYSQLI_CLIENT_INTERACTIVE</literal></entry> + <entry> + Allow <literal>interactive_timeout</literal> seconds (instead of + <literal>wait_timeout</literal> seconds) of inactivity before closing the connection + </entry> + </row> + <row> + <entry><literal>MYSQLI_CLIENT_SSL</literal></entry> + <entry>Use SSL (encryption)</entry> + </row> + </tbody> + </tgroup> + </table> + <note> + <para> + For security reasons the <literal>MULTI_STATEMENT</literal> flag is not supported in + PHP. If you want to execute multiple queries use the + <function>mysqli_multi_query</function> function. + </para> + </note> + </listitem> + </itemizedlist> + </refsect1> + <refsect1> + &reftitle.returnvalues; + <para>&return.success;</para> + </refsect1> + <refsect1> + &reftitle.seealso; <para> - See also - <function>mysqli_connect</function> and + <function>mysqli_connect</function>, + <function>mysqli_init</function>, + <function>mysqli_options</function>, + <function>mysqli_ssl_set</function>, <function>mysqli_close</function>. </para> </refsect1> http://cvs.php.net/diff.php/phpdoc/en/reference/mysqli/functions/mysqli-real-escape-string.xml?r1=1.4&r2=1.5&ty=u Index: phpdoc/en/reference/mysqli/functions/mysqli-real-escape-string.xml diff -u phpdoc/en/reference/mysqli/functions/mysqli-real-escape-string.xml:1.4 phpdoc/en/reference/mysqli/functions/mysqli-real-escape-string.xml:1.5 --- phpdoc/en/reference/mysqli/functions/mysqli-real-escape-string.xml:1.4 Sun May 25 15:09:28 2003 +++ phpdoc/en/reference/mysqli/functions/mysqli-real-escape-string.xml Wed Jan 28 18:18:42 2004 @@ -1,8 +1,9 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.4 $ --> +<!-- $Revision: 1.5 $ --> <refentry id="function.mysqli-real-escape-string"> <refnamediv> <refname>mysqli_real_escape_string</refname> + <refname>mysqli->real_escape_string</refname> <refpurpose> Escapes special characters in a string for use in a SQL statement, taking into account the current charset of the connection @@ -10,18 +11,42 @@ </refnamediv> <refsect1> <title>Description</title> + <para>Procedural style:</para> <methodsynopsis> <type>string</type><methodname>mysqli_real_escape_string</methodname> - <methodparam><type>resource</type><parameter>link</parameter></methodparam> + <methodparam><type>object</type><parameter>link</parameter></methodparam> <methodparam><type>string</type><parameter>escapestr</parameter></methodparam> </methodsynopsis> - - &warn.undocumented.func; - + <para>Object oriented style (method):</para> + <classsynopsis> + <ooclass><classname>mysqli</classname></ooclass> + <methodsynopsis> + <type>string</type> + <methodname>real_escape_sring</methodname> + <methodparam><type>string</type><parameter>query</parameter></methodparam> + </methodsynopsis> + </classsynopsis> + <para> + This function is used to create a legal SQL string that you can use in a SQL statement. + The string <literal>escapestr</literal> is encoded to an escaped SQL string, taking into + account the current character set of the connection. + </para> <para> - See also <function>mysqli_character_set_name</function>. + Characters encoded are <literal>NUL (ASCII 0), \n, \r, \, ', ", and Control-Z</literal>. </para> </refsect1> + <refsect1> + <title>Return values</title> + <para> + Returns an escaped string. + </para> + </refsect1> + <refsect1> + <title>See also</title> + <para> + <function>mysqli_character_set_name</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-real-query.xml?r1=1.4&r2=1.5&ty=u Index: phpdoc/en/reference/mysqli/functions/mysqli-real-query.xml diff -u phpdoc/en/reference/mysqli/functions/mysqli-real-query.xml:1.4 phpdoc/en/reference/mysqli/functions/mysqli-real-query.xml:1.5 --- phpdoc/en/reference/mysqli/functions/mysqli-real-query.xml:1.4 Sun May 25 15:09:28 2003 +++ phpdoc/en/reference/mysqli/functions/mysqli-real-query.xml Wed Jan 28 18:18:42 2004 @@ -1,17 +1,28 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.4 $ --> +<!-- $Revision: 1.5 $ --> <refentry id="function.mysqli-real-query"> <refnamediv> <refname>mysqli_real_query</refname> + <refname>mysqli->real_query</refname> <refpurpose>Execute an SQL query</refpurpose> </refnamediv> <refsect1> <title>Description</title> + <para>Procedural style</para> <methodsynopsis> <type>bool</type><methodname>mysqli_real_query</methodname> - <methodparam><type>resource</type><parameter>link</parameter></methodparam> + <methodparam><type>object</type><parameter>link</parameter></methodparam> <methodparam><type>string</type><parameter>query</parameter></methodparam> </methodsynopsis> + <para>Object oriented style (method):</para> + <classsynopsis> + <ooclass><classname>mysqli</classname></ooclass> + <methodsynopsis> + <type>bool</type> + <methodname>real_query</methodname> + <methodparam><type>string</type><parameter>query</parameter></methodparam> + </methodsynopsis> + </classsynopsis> <para> The <function>mysqli_real_query</function> function is used to execute only a query against the database represented by the <parameter>link</parameter> @@ -26,6 +37,20 @@ </para> </note> </refsect1> + <refsect1> + <title>Return values</title> + <para> + &return.success; + </para> + </refsect1> + <refsect1> + <title>See also</title> + <para> + <function>mysqli_query</function> + <function>mysqli_store_result</function> + <function>mysqli_use_result</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-rollback.xml?r1=1.2&r2=1.3&ty=u Index: phpdoc/en/reference/mysqli/functions/mysqli-rollback.xml diff -u phpdoc/en/reference/mysqli/functions/mysqli-rollback.xml:1.2 phpdoc/en/reference/mysqli/functions/mysqli-rollback.xml:1.3 --- phpdoc/en/reference/mysqli/functions/mysqli-rollback.xml:1.2 Sun May 25 14:02:46 2003 +++ phpdoc/en/reference/mysqli/functions/mysqli-rollback.xml Wed Jan 28 18:18:42 2004 @@ -1,19 +1,42 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.2 $ --> +<!-- $Revision: 1.3 $ --> <refentry id="function.mysqli-rollback"> <refnamediv> <refname>mysqli_rollback</refname> - <refpurpose></refpurpose> + <refname>mysqli->rollback</refname> + <refpurpose>Rolls back current transaction</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>bool</type><methodname>mysqli_rollback</methodname> - <methodparam><type>resource</type><parameter>link</parameter></methodparam> + <methodparam><type>object</type><parameter>link</parameter></methodparam> </methodsynopsis> - - &warn.undocumented.func; - + <classsynopsis> + <ooclass><classname>mysqli</classname></ooclass> + <methodsynopsis> + <type>bool</type> + <methodname>rollback</methodname> + <methodparam><type>void</type><parameter></parameter></methodparam> + </methodsynopsis> + </classsynopsis> + <para> + Rollbacks the current transaction for the database specified by the + <parameter>link</parameter> parameter. + </para> + </refsect1> + <refsect1> + <title>Return values</title> + <para> + &return.success; + </para> + </refsect1> + <refsect1> + <title>See also</title> + <para> + <function>mysqli_commit</function> + <function>mysqli_autocommit</function> + </para> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc/en/reference/mysqli/functions/mysqli-select-db.xml?r1=1.5&r2=1.6&ty=u Index: phpdoc/en/reference/mysqli/functions/mysqli-select-db.xml diff -u phpdoc/en/reference/mysqli/functions/mysqli-select-db.xml:1.5 phpdoc/en/reference/mysqli/functions/mysqli-select-db.xml:1.6 --- phpdoc/en/reference/mysqli/functions/mysqli-select-db.xml:1.5 Sat May 24 22:04:10 2003 +++ phpdoc/en/reference/mysqli/functions/mysqli-select-db.xml Wed Jan 28 18:18:42 2004 @@ -1,15 +1,16 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.5 $ --> +<!-- $Revision: 1.6 $ --> <refentry id="function.mysqli-select-db"> <refnamediv> <refname>mysqli_select_db</refname> + <refname>mysqli->select_db</refname> <refpurpose>Selects the default database for database queries</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>bool</type><methodname>mysqli_select_db</methodname> - <methodparam><type>resource</type><parameter>link</parameter></methodparam> + <methodparam><type>object</type><parameter>link</parameter></methodparam> <methodparam><type>string</type><parameter>dbname</parameter></methodparam> </methodsynopsis> <para> @@ -18,10 +19,26 @@ used when performing queries against the database connection represented by the <parameter>link</parameter> parameter. </para> + <note> + <para> + This function should only be used to change the default database for the connection. + You can select the default database with 4th parameter in <function>mysqli_connect</function>. + </para> + </note> + </refsect1> + <refsect1> + <title>Return values</title> <para> &return.success; </para> </refsect1> + <refsect1> + <title>See also</title> + <para> + <function>mysqli_connect</function> + <function>mysqli_real_connect</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-send-long-data.xml?r1=1.2&r2=1.3&ty=u Index: phpdoc/en/reference/mysqli/functions/mysqli-send-long-data.xml diff -u phpdoc/en/reference/mysqli/functions/mysqli-send-long-data.xml:1.2 phpdoc/en/reference/mysqli/functions/mysqli-send-long-data.xml:1.3 --- phpdoc/en/reference/mysqli/functions/mysqli-send-long-data.xml:1.2 Sun May 25 14:02:46 2003 +++ phpdoc/en/reference/mysqli/functions/mysqli-send-long-data.xml Wed Jan 28 18:18:42 2004 @@ -1,21 +1,50 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.2 $ --> +<!-- $Revision: 1.3 $ --> <refentry id="function.mysqli-send-long-data"> <refnamediv> <refname>mysqli_send_long_data</refname> - <refpurpose></refpurpose> + <refname>stmt->send_long_data</refname> + <refpurpose>Send data in blocks</refpurpose> </refnamediv> <refsect1> <title>Description</title> + <para>Procedural style:</para> <methodsynopsis> <type>bool</type><methodname>mysqli_send_long_data</methodname> - <methodparam><type>resource</type><parameter>stmt</parameter></methodparam> + <methodparam><type>object</type><parameter>stmt</parameter></methodparam> <methodparam><type>int</type><parameter>param_nr</parameter></methodparam> <methodparam><type>string</type><parameter>data</parameter></methodparam> </methodsynopsis> - - &warn.undocumented.func; - + <para>Object oriented style (method)</para> + <classsynopsis> + <ooclass><classname>stmt</classname></ooclass> + <methodsynopsis> + <type>bool</type><methodname>send_long_data</methodname> + <methodparam><type>int</type><parameter>param_nr</parameter></methodparam> + <methodparam><type>string</type><parameter>data</parameter></methodparam> + </methodsynopsis> + </classsynopsis> + <para> + Allows to send parameter data to the server in pieces (or chunks), e.g. if the + size of a blob exceeds the size of <literal>max_allowed_packet</literal>. + This function can be called multiple times to send the parts of a character or + binary data value for a column, which must be one of the TEXT or BLOB datatypes. + </para> + <para> + <parameter>param_nr</parameter> indicates which parameter to associate the data with. + Parameters are numbered beginning with 0. data is a string containing data to be sent. + </para> + </refsect1> + <refsect1> + <title>Return values</title> + <para>&return.success;</para> + </refsect1> + <refsect1> + <title>See also</title> + <para> + <function>mysqli_prepare</function>, + <function>mysqli_bind_param</function> + </para> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc/en/reference/mysqli/functions/mysqli-ssl-set.xml?r1=1.2&r2=1.3&ty=u Index: phpdoc/en/reference/mysqli/functions/mysqli-ssl-set.xml diff -u phpdoc/en/reference/mysqli/functions/mysqli-ssl-set.xml:1.2 phpdoc/en/reference/mysqli/functions/mysqli-ssl-set.xml:1.3 --- phpdoc/en/reference/mysqli/functions/mysqli-ssl-set.xml:1.2 Sun May 25 14:02:46 2003 +++ phpdoc/en/reference/mysqli/functions/mysqli-ssl-set.xml Wed Jan 28 18:18:42 2004 @@ -1,24 +1,66 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.2 $ --> +<!-- $Revision: 1.3 $ --> <refentry id="function.mysqli-ssl-set"> <refnamediv> <refname>mysqli_ssl_set</refname> - <refpurpose></refpurpose> + <refname>mysqli->ssl_set</refname> + <refpurpose>Used for establishing secure connections using SSL.</refpurpose> </refnamediv> <refsect1> <title>Description</title> + <para>Procedural style:</para> + <methodsynopsis> + <type>bool</type><methodname>mysqli_ssl_set</methodname> + <methodparam><type>object</type><parameter>link</parameter></methodparam> + <methodparam choice='opt'><type>string</type><parameter>key</parameter></methodparam> + <methodparam choice='opt'><type>string</type><parameter>cert</parameter></methodparam> + <methodparam choice='opt'><type>string</type><parameter>ca</parameter></methodparam> + <methodparam choice='opt'><type>string</type><parameter>capath</parameter></methodparam> + <methodparam choice='opt'><type>string</type><parameter>cipher</parameter></methodparam> + </methodsynopsis> + <para>Object oriented style (method):</para> + <classsynopsis> + <ooclass><classname>mysqli</classname></ooclass> <methodsynopsis> - <type>string</type><methodname>mysqli_ssl_set</methodname> - <methodparam><type>resource</type><parameter>link</parameter></methodparam> + <type>bool</type><methodname>ssl_set</methodname> <methodparam choice='opt'><type>string</type><parameter>key</parameter></methodparam> <methodparam choice='opt'><type>string</type><parameter>cert</parameter></methodparam> <methodparam choice='opt'><type>string</type><parameter>ca</parameter></methodparam> <methodparam choice='opt'><type>string</type><parameter>capath</parameter></methodparam> <methodparam choice='opt'><type>string</type><parameter>cipher</parameter></methodparam> </methodsynopsis> - - &warn.undocumented.func; - + </classsynopsis> + <para> + The function <function>mysqli_ssl_set</function> is used for establishing + secure connections using SSL. It must be called before + <function>mysqli_real_connect</function>. This function does nothing + unless OpenSSL support is enabled. + </para> + <para> + <parameter>key</parameter> is the pathname to the key file. + <parameter>cert</parameter> is the pathname to the certificate file. + <parameter>ca</parameter> is the pathname to the certificate authority file. + <parameter>capath</parameter> is the pathname to a directory that contains + trusted SSL CA certificates in pem format. + <parameter>cipher</parameter> is a list of allowable ciphers to use for + SSL encryption. + Any unused SSL parameters may be given as &null; + </para> + </refsect1> + <refsect1> + <title>Return values</title> + <para> + This function always returns &true; value. If SSL setup is + incorrect <function>mysqli_real_connect</function> will return an error + when you attempt to connect. + </para> + </refsect1> + <refsect1> + <title>See also</title> + <para> + <function>mysqli_options</function>, + <function>mysqli_real_connect</function> + </para> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc/en/reference/mysqli/functions/mysqli-stat.xml?r1=1.2&r2=1.3&ty=u Index: phpdoc/en/reference/mysqli/functions/mysqli-stat.xml diff -u phpdoc/en/reference/mysqli/functions/mysqli-stat.xml:1.2 phpdoc/en/reference/mysqli/functions/mysqli-stat.xml:1.3 --- phpdoc/en/reference/mysqli/functions/mysqli-stat.xml:1.2 Sat May 24 02:44:21 2003 +++ phpdoc/en/reference/mysqli/functions/mysqli-stat.xml Wed Jan 28 18:18:42 2004 @@ -1,21 +1,44 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.2 $ --> +<!-- $Revision: 1.3 $ --> <refentry id="function.mysqli-stat"> <refnamediv> <refname>mysqli_stat</refname> - <refpurpose> - Gets the current system status - </refpurpose> + <refname>mysqli->stat</refname> + <refpurpose>Gets the current system status</refpurpose> </refnamediv> <refsect1> <title>Description</title> + <para>Procedural style:</para> + <methodsynopsis> + <type>string</type><methodname>mysqli_stat</methodname> + <methodparam><type>object</type><parameter>link</parameter></methodparam> + </methodsynopsis> + <para>Object oriented style (method):</para> + <classsynopsis> + <ooclass><classname>mysqli</classname></ooclass> <methodsynopsis> - <type>string</type><methodname>mysqli_stat</methodname> - <methodparam><type>resource</type><parameter>link</parameter></methodparam> + <type>string</type><methodname>mysqli->stat</methodname> + <methodparam><type>void</type><parameter></parameter></methodparam> </methodsynopsis> - - &warn.undocumented.func; - + </classsynopsis> + <para> + <function>mysqli_stat</function> returns a string containing + information similar to that provided by the 'mysqladmin status' command. + This includes uptime in seconds and the number of running threads, + questions, reloads, and open tables. + </para> + </refsect1> + <refsect1> + <title>Return values</title> + <para> + A string describing the server status. &false; if an error occurred. + </para> + </refsect1> + <refsect1> + <title>See also</title> + <para> + <function>mysqli_get_server_info</function> + </para> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc/en/reference/mysqli/functions/mysqli-stmt-affected-rows.xml?r1=1.2&r2=1.3&ty=u Index: phpdoc/en/reference/mysqli/functions/mysqli-stmt-affected-rows.xml diff -u phpdoc/en/reference/mysqli/functions/mysqli-stmt-affected-rows.xml:1.2 phpdoc/en/reference/mysqli/functions/mysqli-stmt-affected-rows.xml:1.3 --- phpdoc/en/reference/mysqli/functions/mysqli-stmt-affected-rows.xml:1.2 Sun May 25 14:02:46 2003 +++ phpdoc/en/reference/mysqli/functions/mysqli-stmt-affected-rows.xml Wed Jan 28 18:18:42 2004 @@ -1,19 +1,62 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.2 $ --> +<!-- $Revision: 1.3 $ --> <refentry id="function.mysqli-stmt-affected-rows"> <refnamediv> <refname>mysqli_stmt_affected_rows</refname> - <refpurpose></refpurpose> + <refname>mysqli_stmt->affected_rows</refname> + <refpurpose>Returns the total number of rows changed, deleted, or + inserted by the last executed statement + </refpurpose> </refnamediv> <refsect1> <title>Description</title> - <methodsynopsis> - <type>mixed</type><methodname>mysqli_stmt_affected_rows</methodname> - <methodparam><type>object</type><parameter>stmt</parameter></methodparam> - </methodsynopsis> - - &warn.undocumented.func; - + <para>Procedural style :</para> + <methodsynopsis> + <type>mixed</type><methodname>mysqli_stmt_affected_rows</methodname> + <methodparam><type>object</type><parameter>stmt</parameter></methodparam> + </methodsynopsis> + <para>Object oriented style (property):</para> + <classsynopsis> + <ooclass><classname>stmt</classname></ooclass> + <fieldsynopsis><type>mixed</type><varname>affected_rows</varname></fieldsynopsis> + </classsynopsis> + <para> + <function>mysqli_stmt_affected_rows</function> returns the number of rows affected + by INSERT, UPDATE, or DELETE query. If the last query was invalid, this function will return -1. + </para> + <note> + <para> + For SELECT statements <function>mysqli_affected_rows</function> works like + <function>mysqli_num_rows</function>. + </para> + </note> + <para> + The <function>mysqli_stmt_affected_rows</function> function only works with queries + which update a table. In order to return the number of rows from a SELECT query, use + the <function>mysqli_stmt_num_rows</function> function instead. + </para> + </refsect1> + <refsect1> + <title>Return Values</title> + <para> + An integer greater than zero indicates the number of rows affected or retrieved. + Zero indicates that no records where updated for an UPDATE/DELETE statement, no + rows matched the WHERE clause in the query or that no query has yet been executed. + -1 indicates that the query has returned an error. + </para> + <note> + <para> + If the number of affected rows is greater than maximal PHP int value, the number of + affected rows will be returned as a string value. + </para> + </note> + </refsect1> + <refsect1> + <title>See also</title> + <para> + <function>mysqli_stmt_num_rows</function>, + <function>mysqli_prepare</function> + </para> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc/en/reference/mysqli/functions/mysqli-stmt-close.xml?r1=1.2&r2=1.3&ty=u Index: phpdoc/en/reference/mysqli/functions/mysqli-stmt-close.xml diff -u phpdoc/en/reference/mysqli/functions/mysqli-stmt-close.xml:1.2 phpdoc/en/reference/mysqli/functions/mysqli-stmt-close.xml:1.3 --- phpdoc/en/reference/mysqli/functions/mysqli-stmt-close.xml:1.2 Sun May 25 14:02:46 2003 +++ phpdoc/en/reference/mysqli/functions/mysqli-stmt-close.xml Wed Jan 28 18:18:42 2004 @@ -1,19 +1,44 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.2 $ --> +<!-- $Revision: 1.3 $ --> <refentry id="function.mysqli-stmt-close"> <refnamediv> <refname>mysqli_stmt_close</refname> - <refpurpose>close statement</refpurpose> + <refname>mysqli_stmt->close</refname> + <refpurpose>Closes a prepared statement</refpurpose> </refnamediv> <refsect1> <title>Description</title> + <para>Procedural style:</para> + <methodsynopsis> + <type>bool</type><methodname>mysqli_stmt_close</methodname> + <methodparam><type>object</type><parameter>stmt</parameter></methodparam> + </methodsynopsis> + <para>Object oriented style (method):</para> + <classsynopsis> + <ooclass><classname>mysqli_stmt</classname></ooclass> <methodsynopsis> - <type>bool</type><methodname>mysqli_stmt_close</methodname> - <methodparam><type>resource</type><parameter>stmt</parameter></methodparam> - </methodsynopsis> - - &warn.undocumented.func; - + <type>bool</type><methodname>mysqli_stmt->close</methodname> + <methodparam><type>void</type><parameter></parameter></methodparam> + </methodsynopsis> + </classsynopsis> + <para> + Closes a prepared statement. <function>mysql_stmt_close</function> also deallocates the + statement handle pointed to by stmt. + If the current statement has pending or unread results, this function cancels them so that + the next query can be executed. + </para> + </refsect1> + <refsect1> + <title>Return values</title> + <para>&return.success;</para> + </refsect1> + <refsect1> + <title>See also</title> + <para> + <function>mysqli_stmt_num_rows</function>, + <function>mysqli_prepare</function>, + <function>mysqli_execute</function> + </para> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc/en/reference/mysqli/functions/mysqli-stmt-errno.xml?r1=1.2&r2=1.3&ty=u Index: phpdoc/en/reference/mysqli/functions/mysqli-stmt-errno.xml diff -u phpdoc/en/reference/mysqli/functions/mysqli-stmt-errno.xml:1.2 phpdoc/en/reference/mysqli/functions/mysqli-stmt-errno.xml:1.3 --- phpdoc/en/reference/mysqli/functions/mysqli-stmt-errno.xml:1.2 Sun May 25 14:02:46 2003 +++ phpdoc/en/reference/mysqli/functions/mysqli-stmt-errno.xml Wed Jan 28 18:18:42 2004 @@ -1,19 +1,48 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.2 $ --> +<!-- $Revision: 1.3 $ --> <refentry id="function.mysqli-stmt-errno"> <refnamediv> <refname>mysqli_stmt_errno</refname> - <refpurpose></refpurpose> + <refname>mysqli_stmt->errno</refname> + <refpurpose>Returns the error code for the most recent statement call</refpurpose> </refnamediv> <refsect1> <title>Description</title> - <methodsynopsis> - <type>int</type><methodname>mysqli_stmt_errno</methodname> - <methodparam><type>resource</type><parameter>stmt</parameter></methodparam> - </methodsynopsis> - - &warn.undocumented.func; - + <para>Procedural style :</para> + <methodsynopsis> + <type>int</type><methodname>mysqli_stmt_errno</methodname> + <methodparam><type>object</type><parameter>stmt</parameter></methodparam> + </methodsynopsis> + <para>Object oriented style (property):</para> + <classsynopsis> + <ooclass><classname>stmt</classname></ooclass> + <fieldsynopsis><type>int</type><varname>errno</varname></fieldsynopsis> + </classsynopsis> + <para> + For the statement specified by <literal>stmt</literal>, <function>mysqli_stmt_errno()</function> + returns the error code for the most recently invoked statement function that can succeed or fail. + </para> + <note> + <para> + Client error message numbers are listed in the MySQL <filename>errmsg.h</filename> header file, + server error message numbers are listed in <filename>mysqld_error.h</filename>. + In the MySQL source distribution you can find a complete list of error messages and error numbers + in the file <filename>Docs/mysqld_error.txt</filename>. + </para> + </note> + </refsect1> + <refsect1> + <title>Return values</title> + <para> + An error code value. Zero means no error occurred. + </para> + </refsect1> + <refsect1> + <title>See also</title> + <para> + <function>mysqli_stmt_error</function>, + <function>mysqli_stmt_sqlstate</function> + </para> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc/en/reference/mysqli/functions/mysqli-stmt-error.xml?r1=1.2&r2=1.3&ty=u Index: phpdoc/en/reference/mysqli/functions/mysqli-stmt-error.xml diff -u phpdoc/en/reference/mysqli/functions/mysqli-stmt-error.xml:1.2 phpdoc/en/reference/mysqli/functions/mysqli-stmt-error.xml:1.3 --- phpdoc/en/reference/mysqli/functions/mysqli-stmt-error.xml:1.2 Sun May 25 14:02:46 2003 +++ phpdoc/en/reference/mysqli/functions/mysqli-stmt-error.xml Wed Jan 28 18:18:42 2004 @@ -1,20 +1,43 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.2 $ --> +<!-- $Revision: 1.3 $ --> <refentry id="function.mysqli-stmt-error"> <refnamediv> <refname>mysqli_stmt_error</refname> - <refpurpose></refpurpose> + <refname>mysqli_stmt->error</refname> + <refpurpose>Returns a string description for last statement error</refpurpose> </refnamediv> <refsect1> <title>Description</title> - <methodsynopsis> - <type>string</type><methodname>mysqli_stmt_error</methodname> - <methodparam><type>resource</type><parameter>stmt</parameter></methodparam> - </methodsynopsis> - - &warn.undocumented.func; - + <para>Procedural style:</para> + <methodsynopsis> + <type>string</type><methodname>mysqli_stmt_error</methodname> + <methodparam><type>object</type><parameter>stmt</parameter></methodparam> + </methodsynopsis> + <para>Object oriented style (property):</para> + <classsynopsis> + <ooclass><classname>stmt</classname></ooclass> + <fieldsynopsis><type>string</type><varname>error</varname></fieldsynopsis> + </classsynopsis> + <para> + For the statement specified by <literal>stmt</literal>, <function>mysql_stmt_error</function> + returns a containing the error message for the most recently invoked statement function that + can succeed or fail. + </para> + </refsect1> + <refsect1> + <title>Return values</title> + <para> + A string that describes the error. An empty string if no error occurred. + </para> </refsect1> + <refsect1> + <title>See also</title> + <para> + <function>mysqli_stmt_errno</function>, + <function>mysqli_stmt_sqlstate</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-stmt-store-result.xml?r1=1.1&r2=1.2&ty=u Index: phpdoc/en/reference/mysqli/functions/mysqli-stmt-store-result.xml diff -u phpdoc/en/reference/mysqli/functions/mysqli-stmt-store-result.xml:1.1 phpdoc/en/reference/mysqli/functions/mysqli-stmt-store-result.xml:1.2 --- phpdoc/en/reference/mysqli/functions/mysqli-stmt-store-result.xml:1.1 Sun May 25 16:48:07 2003 +++ phpdoc/en/reference/mysqli/functions/mysqli-stmt-store-result.xml Wed Jan 28 18:18:42 2004 @@ -1,19 +1,52 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.1 $ --> +<!-- $Revision: 1.2 $ --> <refentry id="function.mysqli-stmt-store-result"> <refnamediv> <refname>mysqli_stmt_store_result</refname> - <refpurpose></refpurpose> + <refname>mysqli_stmt->store_result</refname> + <refpurpose>Transfers a result set from a prepared statement</refpurpose> </refnamediv> <refsect1> <title>Description</title> + <para>Procedural style:</para> + <methodsynopsis> + <type>bool</type><methodname>mysqli_stmt_store_result</methodname> + <methodparam><type>object</type><parameter>stmt</parameter></methodparam> + </methodsynopsis> + <para>Object oriented style (method):</para> + <classsynopsis> + <ooclass><classname>mysqli_stmt</classname></ooclass> <methodsynopsis> - <type>resource</type><methodname>mysqli_stmt_store_result</methodname> - <methodparam><type>resource</type><parameter>stmt</parameter></methodparam> + <type>bool</type><methodname>store_result</methodname> + <methodparam><type>void</type><parameter></parameter></methodparam> </methodsynopsis> - - &warn.undocumented.func; - + </classsynopsis> + <para> + You must call <function>mysql_stmt_store_result</function> for every query that + successfully produces a result set (<literal>SELECT, SHOW, DESCRIBE, EXPLAIN</literal>), + and only if you want to buffer the complete result set by the client, + so that the subsequent <function>mysql_fetch</function> call returns buffered data. + </para> + <note> + <para> + It is unnecessary to call <function>mysql_stmt_store_result()</function> for other queries, + but if you do, it will not harm or cause any notable performance in all cases. + You can detect whether the query produced a result set by checking if + <function>mysql_get_metadata</function> returns NULL. + </para> + </note> + </refsect1> + <refsect1> + <title>Return values</title> + <para>&return.success;</para> + </refsect1> + <refsect1> + <title>See also</title> + <para> + <function>mysqli_prepare</function>, + <function>mysqli_get_metadata</function>, + <function>mysqli_fetch</function> + </para> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc/en/reference/mysqli/functions/mysqli-store-result.xml?r1=1.4&r2=1.5&ty=u Index: phpdoc/en/reference/mysqli/functions/mysqli-store-result.xml diff -u phpdoc/en/reference/mysqli/functions/mysqli-store-result.xml:1.4 phpdoc/en/reference/mysqli/functions/mysqli-store-result.xml:1.5 --- phpdoc/en/reference/mysqli/functions/mysqli-store-result.xml:1.4 Thu Dec 18 09:14:31 2003 +++ phpdoc/en/reference/mysqli/functions/mysqli-store-result.xml Wed Jan 28 18:18:42 2004 @@ -1,16 +1,27 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.4 $ --> +<!-- $Revision: 1.5 $ --> <refentry id="function.mysqli-store-result"> <refnamediv> <refname>mysqli_store_result</refname> + <refname>mysqli->store_result</refname> <refpurpose>Transfers a result set from the last query</refpurpose> </refnamediv> <refsect1> <title>Description</title> + <para>Procedural style:</para> + <methodsynopsis> + <type>object</type><methodname>mysqli_store_result</methodname> + <methodparam><type>object</type><parameter>link</parameter></methodparam> + </methodsynopsis> + <para>Object oriented style (method):</para> + <classsynopsis> + <ooclass><classname>mysqli</classname></ooclass> <methodsynopsis> - <type>resource</type><methodname>mysqli_store_result</methodname> - <methodparam><type>resource</type><parameter>link</parameter></methodparam> + <type>object</type> + <methodname>store_result</methodname> + <methodparam><type>void</type><parameter></parameter></methodparam> </methodsynopsis> + </classsynopsis> <para> Transfers the result set from the last query on the database connection represented by the <parameter>link</parameter> parameter to be used with @@ -20,10 +31,39 @@ <para> Although it is always good practice to free the memory used by the result of a query using the <function>mysqli_free_result</function> function, when - transferring large result sets using the <function>mysqli_store_result</function> + transfering large result sets using the <function>mysqli_store_result</function> this becomes particularly important. </para> </note> + <note> + <para> + <function>mysqli_store_result</function> returns &false; in case the query + didn't return a result set (if the query was, for example an INSERT + statement). This function also returns &false; if the reading of the + result set failed. You can check if you have got an error by checking + if <function>mysqli_error</function> doesn't return an empty string, if + <function>mysqli_errno</function> returns a non zero value, or if + <function>mysqli_field_count</function> returns a non zero value. + Also possible reason for this function returning &false; after + successfull call to <function>mysqli_query</function> can be too large + result set (memory for it cannot be allocated). If + <function>mysqli_field_count</function> returns a non-zero value, the + statement should have produced a non-empty result set. + </para> + </note> + </refsect1> + <refsect1> + <title>Return values</title> + <para> + Returns a buffered result object or &false; if an error occured. + </para> + </refsect1> + <refsect1> + <title>See also</title> + <para> + <function>mysqli_real_query</function>, + <function>mysqli_use_result</function>. + </para> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc/en/reference/mysqli/functions/mysqli-thread-id.xml?r1=1.3&r2=1.4&ty=u Index: phpdoc/en/reference/mysqli/functions/mysqli-thread-id.xml diff -u phpdoc/en/reference/mysqli/functions/mysqli-thread-id.xml:1.3 phpdoc/en/reference/mysqli/functions/mysqli-thread-id.xml:1.4 --- phpdoc/en/reference/mysqli/functions/mysqli-thread-id.xml:1.3 Sun May 25 15:09:28 2003 +++ phpdoc/en/reference/mysqli/functions/mysqli-thread-id.xml Wed Jan 28 18:18:42 2004 @@ -1,20 +1,29 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.3 $ --> +<!-- $Revision: 1.4 $ --> <refentry id="function.mysqli-thread-id"> <refnamediv> <refname>mysqli_thread_id</refname> + <refname>mysqli->thread_id</refname> <refpurpose>Returns the thread ID for the current connection</refpurpose> </refnamediv> <refsect1> <title>Description</title> - <methodsynopsis> - <type>int</type><methodname>mysqli_thread_id</methodname> - <methodparam><type>resource</type><parameter>link</parameter></methodparam> - </methodsynopsis> + <para>Procedural style:</para> + <methodsynopsis> + <type>int</type><methodname>mysqli_thread_id</methodname> + <methodparam><type>object</type><parameter>link</parameter></methodparam> + </methodsynopsis> + <para>Object oriented style (property):</para> + <classsynopsis> + <ooclass><classname>mysqli</classname></ooclass> + <fieldsynopsis><type>int</type><varname>thread_id</varname></fieldsynopsis> + </classsynopsis> <para> The <function>mysqli_thread_id</function> function returns the thread ID for the current connection which can then be killed using the - <function>mysqli_kill</function> function. + <function>mysqli_kill</function> function. If the connection is lost + and you reconnect with <function>mysqli_ping</function>, the thread ID + will be other. Therefore you should get the thread ID only when you need it. </para> <note> <para> @@ -22,8 +31,23 @@ if the connection is broken and then re-established a new thread ID will be assigned. </para> + <para> + To kill a running query you can use the SQL command <literal>KILL QUERY processid]</literal>. + </para> </note> </refsect1> + <refsect1> + <title>Return values</title> + <para> + <function>mysqli_thread_id</function> returns the Thread ID for the current connection. + </para> + </refsect1> + <refsect1> + <title>See also</title> + <para> + <function>mysqli_kill</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-thread-safe.xml?r1=1.2&r2=1.3&ty=u Index: phpdoc/en/reference/mysqli/functions/mysqli-thread-safe.xml diff -u phpdoc/en/reference/mysqli/functions/mysqli-thread-safe.xml:1.2 phpdoc/en/reference/mysqli/functions/mysqli-thread-safe.xml:1.3 --- phpdoc/en/reference/mysqli/functions/mysqli-thread-safe.xml:1.2 Sat May 24 02:44:21 2003 +++ phpdoc/en/reference/mysqli/functions/mysqli-thread-safe.xml Wed Jan 28 18:18:42 2004 @@ -1,21 +1,27 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.2 $ --> +<!-- $Revision: 1.3 $ --> <refentry id="function.mysqli-thread-safe"> <refnamediv> <refname>mysqli_thread_safe</refname> - <refpurpose> - Returns whether thread safety is given or not - </refpurpose> + <refpurpose>Returns whether thread safety is given or not</refpurpose> </refnamediv> <refsect1> <title>Description</title> - <methodsynopsis> - <type>bool</type><methodname>mysqli_thread_safe</methodname> - <methodparam><type>void</type><parameter></parameter></methodparam> - </methodsynopsis> - - &warn.undocumented.func; - + <para>Procedural style:</para> + <methodsynopsis> + <type>bool</type><methodname>mysqli_thread_safe</methodname> + <methodparam><type>void</type><parameter></parameter></methodparam> + </methodsynopsis> + <para> + <function>mysqli_thread_safe</function> indicates whether the + client library is compiled as thread-safe. + </para> + </refsect1> + <refsect1> + <title>Return values</title> + <para> + &true; if the client library is thread-safe, otherwise &false;. + </para> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc/en/reference/mysqli/functions/mysqli-use-result.xml?r1=1.5&r2=1.6&ty=u Index: phpdoc/en/reference/mysqli/functions/mysqli-use-result.xml diff -u phpdoc/en/reference/mysqli/functions/mysqli-use-result.xml:1.5 phpdoc/en/reference/mysqli/functions/mysqli-use-result.xml:1.6 --- phpdoc/en/reference/mysqli/functions/mysqli-use-result.xml:1.5 Tue Jun 10 13:18:06 2003 +++ phpdoc/en/reference/mysqli/functions/mysqli-use-result.xml Wed Jan 28 18:18:42 2004 @@ -1,16 +1,27 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.5 $ --> +<!-- $Revision: 1.6 $ --> <refentry id="function.mysqli-use-result"> <refnamediv> <refname>mysqli_use_result</refname> + <refname>mysqli->use_result</refname> <refpurpose>Initiate a result set retrieval</refpurpose> </refnamediv> <refsect1> <title>Description</title> + <para>Procedural style:</para> + <methodsynopsis> + <type>mixed</type><methodname>mysqli_use_result</methodname> + <methodparam><type>object</type><parameter>link</parameter></methodparam> + </methodsynopsis> + <para>Object oriented style (method):</para> + <classsynopsis> + <ooclass><classname>mysqli</classname></ooclass> <methodsynopsis> - <type>resource</type><methodname>mysqli_use_result</methodname> - <methodparam><type>resource</type><parameter>link</parameter></methodparam> + <type>mixed</type> + <methodname>use_result</methodname> + <methodparam><type>void</type><parameter></parameter></methodparam> </methodsynopsis> + </classsynopsis> <para> <function>mysqli_use_result</function> is used to initiate the retrieval of a result set from the last query executed using the @@ -26,12 +37,24 @@ the entire result set from the database and hence cannot be used functions such as <function>mysqli_data_seek</function> to move to a particular row within the set. To use this functionality, the result set must be - stored using <function>mysqli_store_result</function> + stored using <function>mysqli_store_result</function>. One should not + use <function>mysqli_use_result</function> if a lot of processing on + the client side is performed, since this will tie up the server and + prevent other threads from updating any tables from which the data is + being fetched. </para> </note> + </refsect1> + <refsect1> + <title>Return values</title> + <para> + Returns an unbuffered result object or &false; if an error occured. + </para> + </refsect1> + <refsect1> + <title>See also</title> <para> - See also - <function>mysqli_real_query</function> and + <function>mysqli_real_query</function>, <function>mysqli_store_result</function>. </para> </refsect1> http://cvs.php.net/diff.php/phpdoc/en/reference/mysqli/functions/mysqli-warning-count.xml?r1=1.3&r2=1.4&ty=u Index: phpdoc/en/reference/mysqli/functions/mysqli-warning-count.xml diff -u phpdoc/en/reference/mysqli/functions/mysqli-warning-count.xml:1.3 phpdoc/en/reference/mysqli/functions/mysqli-warning-count.xml:1.4 --- phpdoc/en/reference/mysqli/functions/mysqli-warning-count.xml:1.3 Tue Jun 10 13:18:06 2003 +++ phpdoc/en/reference/mysqli/functions/mysqli-warning-count.xml Wed Jan 28 18:18:42 2004 @@ -1,23 +1,48 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.3 $ --> +<!-- $Revision: 1.4 $ --> <refentry id="function.mysqli-warning-count"> <refnamediv> <refname>mysqli_warning_count</refname> - <refpurpose> - Returns the number of warnings from the last query for the given link - </refpurpose> + <refname>mysqli->warning_count</refname> + <refpurpose>Returns the number of warnings from the last query for the given link</refpurpose> </refnamediv> <refsect1> <title>Description</title> - <methodsynopsis> - <type>resource</type><methodname>mysqli_warning_count</methodname> - <methodparam><type>resource</type><parameter>link</parameter></methodparam> - </methodsynopsis> + <para>Procedural style:</para> + <methodsynopsis> + <type>int</type><methodname>mysqli_warning_count</methodname> + <methodparam><type>object</type><parameter>link</parameter></methodparam> + </methodsynopsis> + <para>Object oriented style (property):</para> + <classsynopsis> + <ooclass><classname>mysqli</classname></ooclass> + <fieldsynopsis><type>int</type><varname>warning_count</varname></fieldsynopsis> + </classsynopsis> <para> <function>mysqli_warning_count</function> returns the number of warnings from the last query in the connection represented by the <parameter>link</parameter> parameter. </para> + <note> + <para> + For retrieving warning messages you can use the SQL command + <literal>SHOW WARNINGS [limit row_count]</literal>. + </para> + </note> + </refsect1> + <refsect1> + <title>Return values</title> + <para> + Number of warnings or zero if there are no warnings. + </para> + </refsect1> + <refsect1> + <title>See also</title> + <para> + <function>mysqli_errno</function>, + <function>mysqli_error</function>, + <function>mysqli_sqlstate</function> + </para> </refsect1> </refentry>