diff --git a/reference/mysqli/functions/mysqli-affected-rows.xml b/reference/mysqli/functions/mysqli-affected-rows.xml
index caaf1aeed4..7a256c44ed 100644
--- a/reference/mysqli/functions/mysqli-affected-rows.xml
+++ b/reference/mysqli/functions/mysqli-affected-rows.xml
@@ -1,139 +1,135 @@
-
+
-
- mysqli_affected_rows
- Gets the number of affected rows in a previous MySQL operation
-
-
- Description
-
- mixedmysqli_affected_rows
- objectlink
-
-
- mysqli_affected_rows returns the number of rows affected by the last
- INSERT, UPDATE, or DELETE query associated with the provided link
- parameter. If the last query was invalid, this function will return -1.
-
-
-
- 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.
-
-
-
- The mysqli_affected_rows function only works with queries which modify
- a table. In order to return the number of rows from a SELECT query, use the
- mysqli_num_rows function instead.
-
-
-
- Delete-Query
- Procedural style:
-
-
+ mysqli_affected_rows
+ mysqli->affected_rows
+ Gets the number of affected rows in a previous MySQL operation
+
+
+ Description
+ Procedural style:
+
+ mixedmysqli_affected_rows
+ objectlink
+
+ Object oriented style (property):
+
+ mysqli
+ mixedaffected_rows
+
+
+ mysqli_affected_rows returns the number of rows affected by the last
+ INSERT, UPDATE, or DELETE query associated with the provided link
+ parameter. If the last query was invalid, this function will return -1.
+
+
+
+ For SELECT statements mysqli_affected_rows works like
+ mysqli_num_rows.
+
+
+
+ The mysqli_affected_rows function only works with queries which modify
+ a table. In order to return the number of rows from a SELECT query, use the
+ mysqli_num_rows function instead.
+
+
+
+ Return Values
+
+ 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.
+
+
+
+ If the number of affected rows is greater than maximal int value, the number of affected rows
+ will be returned as a string.
+
+
+
+
+ Example
+
+
+ Example for affected rows
+
+
-]]>
-
- Object oriented style:
-
-query("DELETE FROM mytable WHERE id < 10");
- printf ("Records deleted: %2d\n", $mysql->affected_rows());
+ /* 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));
- /* 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());
+ /* 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));
- /* close connection */
- $mysql->close();
-?>
-]]>
-
-
- The above examples would produce the following output:
-
-
-
-
-
-
- Update-Query
- Procedural style:
-
-
-]]>
-
- Object oriented style:
-
-query("UPDATE mytable SET used=1 WHERE id < 10");
- printf ("Updated records: %d\n", $mysql->affected_rows($link));
+ mysqli_close($link);
- /* close connection */
- $mysql->close($link);
-?>
-]]>
-
-
- The above examples would produce the following output:
-
-
-
-
-
-
-
- See also: mysqli_num_rows,
- mysqli_info.
-
-
-
+ /* ---- 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();
+ ?>
+ ]]>
+
+
+
+
+
+ See also
+
+ mysqli_num_rows,
+ mysqli_info.
+
+
+
+
mysqli_autocommit
- Turns on or off auto-committing database modifications
+ mysqli->auto_commit
+ Turns on or off auto-commiting database modifications
Description
+ Procedural style:
+
+ boolmysqli_autocommit
+ objectlink
+ boolmode
+
+ Object oriented style (method)
+
+ mysqli
- boolmysqli_autocommit
- objectlink
+ bool
+ auto_commit
boolmode
-
+
+
mysqli_autocommit is used to turn on or off auto-commit mode
on queries for the database connection represented by the link
- resource.
-
-
- &return.success;
+ object.
@@ -30,67 +38,75 @@
'SELECT @@autocommit'.
+
+
+ Return values
+
+ &return.success;
+
+
+
+ Example
Using the mysqli_autocommit function
- Procedural style:
autocommit(TRUE);
+
+ if ($result = $mysqli->query("SELECT @@autocommit")) {
+ $row = $result->fetch_row();
+ printf("Autocommit is %s\n", $row[0]);
+ $result->free();
+ }
+
+ $mysqli->close();
+?>
- /* close connection */
- mysqli_close($link);
?>
]]>
- Object oriented style:
-
-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();
-?>
-]]>
-
-
- The above examples would produce the following output:
-
-
-
-
+
+
+ See also
- See also mysqli_commit,
+ mysqli_commit,
mysqli_rollback.
diff --git a/reference/mysqli/functions/mysqli-bind-param.xml b/reference/mysqli/functions/mysqli-bind-param.xml
index 0ef9800e09..5b829e6b3e 100644
--- a/reference/mysqli/functions/mysqli-bind-param.xml
+++ b/reference/mysqli/functions/mysqli-bind-param.xml
@@ -1,19 +1,32 @@
-
+
mysqli_bind_param
+ stmt->bind_param
Binds variables to a prepared statement as parameters
Description
+ Procedural style:
+
+ boolmysqli_bind_param
+ objectstmt
+ arraytypes
+ mixedvar1
+ mixedvar2, ...
+
+ Object oriented style (method):
+
+ stmt
- boolmysqli_bind_param
- objectstmt
+ bool
+ bind_param
arraytypes
mixedvar1
mixedvar2, ...
+
mysql_bind_param 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.
-
- Prepared statements
- Procedural style:
-
+
+
+ Return values
+
+ &return.success;
+
+
+
+ Example
+
+ Prepared statements
+
-]]>
-
- Object oriented style:
-
-query("CREATE TABLE mytable (a int, b int, c varchar(30))");
@@ -95,13 +109,18 @@
]]>
+
+
+ See also
- See also: mysqli_bind_result,
+ mysqli_bind_result,
mysqli_execute,
- mysqli_fetch
+ mysqli_fetch,
- mysqli_prepare
- mysqli_send_long_data
+ mysqli_prepare,
+ mysqli_send_long_data,
+ mysqli_stmt_errno,
+ mysqli_stmt_error
diff --git a/reference/mysqli/functions/mysqli-bind-result.xml b/reference/mysqli/functions/mysqli-bind-result.xml
index 624ff3f2f5..245b95ae45 100644
--- a/reference/mysqli/functions/mysqli-bind-result.xml
+++ b/reference/mysqli/functions/mysqli-bind-result.xml
@@ -1,21 +1,64 @@
-
+
mysqli_bind_result
+ stmt->bind_result
Binds variables to a prepared statement for result storage
Description
+ Procedural style:
boolmysqli_bind_result
- resourcestmt
- mixedvar
- intlen
+ objectstmt
+ mixedvar1
+ mixedvar2, ...
-
- &warn.undocumented.func;
-
+ Object oriented style (method):
+
+ stmt
+
+ bool
+ bind_result
+ mixedvar1
+ mixedvar2, ...
+
+
+
+ mysqli_bind_result is used to associate (bind) columns in the result
+ set to variables. When mysqli_fetch is called to fetch data, the MySQL
+ client/server protocol places the data for the bound columns into the specified variables
+ var1, ....
+
+
+
+ Note that all columns must be bound prior to calling mysqli_fetch.
+ Depending on column types bound variables can silently change to the corresponding PHP type.
+
+
+ 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 mysqli_fetch is called.
+
+
+
+
+ Return values
+
+ &return.success;
+
+
+
+ See also
+
+ mysqli_bind_param,
+ mysqli_execute,
+ mysqli_fetch,
+
+ mysqli_prepare,
+ mysqli_stmt_errno,
+ mysqli_stmt_error
+
diff --git a/reference/mysqli/functions/mysqli-change-user.xml b/reference/mysqli/functions/mysqli-change-user.xml
index 459f421c67..d0fa7ae9f4 100644
--- a/reference/mysqli/functions/mysqli-change-user.xml
+++ b/reference/mysqli/functions/mysqli-change-user.xml
@@ -1,27 +1,37 @@
-
+
mysqli_change_user
+ mysqli->change_user
Changes the user of the specified database connection
Description
+ Procedural style:
+
+ boolmysqli_change_user
+ objectlink
+ stringuser
+ stringpassword
+ stringdatabase
+
+ Object oriented style (method):
+
+ mysqli
- boolmysqli_change_user
- resourcelink
+ bool
+ change_user
stringuser
stringpassword
stringdatabase
+
mysqli_change_user is used to change the user of the specified
database connection as given by the link parameter and to set the
current database to that specified by the database parameter.
-
- &return.success;
-
If desired, the &null; value may be passed in place of the database
parameter resulting in only changing the user and not selecting a database. To select
@@ -41,6 +51,15 @@
closing all temporary tables, and unlocking all locked tables.
+
+
+ Return Values
+
+ &return.success;
+
+
+
+ Example
Using the mysqli_change_user function
diff --git a/reference/mysqli/functions/mysqli-character-set-name.xml b/reference/mysqli/functions/mysqli-character-set-name.xml
index 43d1bba6c4..3bff90555b 100644
--- a/reference/mysqli/functions/mysqli-character-set-name.xml
+++ b/reference/mysqli/functions/mysqli-character-set-name.xml
@@ -1,21 +1,38 @@
-
+
mysqli_character_set_name
+ mysqli->character_set_name
Returns the default character set for the database connection
Description
+ Procedural style:
stringmysqli_character_set_name
- resourcelink
+ objectlink
+ Object oriented style (method):
+
+ mysqli
+
+ string
+ character_set_name
+ void
+
+
Returns the current character set for the database connection specified by the
link parameter.
-
+
+
+ Return values
+ The default character set for the current connection
+
+
+ Example
Using the mysqli_character_set_name function
@@ -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);
?>
]]>
-
-
- See also mysqli_real_escape_string.
-
-
+
+
+ See also
+
+ mysqli_real_escape_string.
+
+
+
mysqli_close
+ mysqli->close
Closes a previously opened database connection
Description
+ Procedural style:
+
+ boolmysqli_close
+ objectlink
+
+ Object oriented style (method):
+
+ mysqli
- boolmysqli_close
- resourcelink
+ bool
+ close
+ void
+
The mysqli_close function closes a previously opened database
- connection specified by the link parameter.
+ connection specified by the link parameter.
+
+
+ Return values
- See also
- mysqli_connect and
+ &return.success;
+
+
+
+ See also
+
+ mysqli_connect,
+ mysqli_init,
mysqli_real_connect.
diff --git a/reference/mysqli/functions/mysqli-commit.xml b/reference/mysqli/functions/mysqli-commit.xml
index 85a1d5de89..490b3fe54c 100644
--- a/reference/mysqli/functions/mysqli-commit.xml
+++ b/reference/mysqli/functions/mysqli-commit.xml
@@ -1,23 +1,43 @@
-
+
mysqli_commit
+ mysqli->commit
Commits the current transaction
Description
+ Procedural style:
+
+ boolmysqli_commit
+ objectlink
+
+ Object oriented style (method)
+
+ mysqli
- boolmysqli_commit
- resourcelink
+ bool
+ commit
+ void
+
Commits the current transaction for the database specified by the
link parameter.
+
+
+ Return values
- See also mysqli_autocommit,
- mysqli_rollback.
+ &return.success;
+
+
+
+ See also
+
+ mysqli_autocommit,
+ mysqli_rollback.
diff --git a/reference/mysqli/functions/mysqli-connect.xml b/reference/mysqli/functions/mysqli-connect.xml
index 23f2f67d70..75ba56f7f6 100644
--- a/reference/mysqli/functions/mysqli-connect.xml
+++ b/reference/mysqli/functions/mysqli-connect.xml
@@ -1,27 +1,42 @@
-
+
mysqli_connect
+ mysqli()
Open a new connection to the MySQL server
Description
-
- resourcemysqli_connect
+ Procedural style
+
+ objectmysqli_connect
+ stringhostname
+ stringusername
+ stringpasswd
+ stringdbname
+ intport
+ stringsocket
+
+ Object oriented style (constructor):
+
+ mysqli
+
+
stringhostname
stringusername
stringpasswd
stringdbname
intport
stringsocket
-
+
+
The mysqli_connect function attempts to open a connection to the MySQL Server
running on host 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 mysqli_connect
- 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.
The username and password parameters specify the
@@ -48,24 +63,61 @@
MySQL database is determined by the host parameter.
+
+
+ Return values
+
+ Returns a object which represents the connection to a MySQL Server or &false if the connection failed.
+
+
+
+ Example
Using the mysqli_connect function
+ 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();
+?>
]]>
+
+
+ See also
- See also
- mysqli_close and
+ mysqli_close,
+ mysqli_init,
+ mysqli_options
mysqli_real_connect.
diff --git a/reference/mysqli/functions/mysqli-data-seek.xml b/reference/mysqli/functions/mysqli-data-seek.xml
index 088cb33825..565c7842de 100644
--- a/reference/mysqli/functions/mysqli-data-seek.xml
+++ b/reference/mysqli/functions/mysqli-data-seek.xml
@@ -1,17 +1,28 @@
-
+
mysqli_data_seek
- Adjusts the result pointer to an arbitrary row in the result
+ result->data_seek
+ Adjusts the result pointer to an arbitary row in the result
Description
+ Procedural style:
+
+ boolmysqli_data_seek
+ objectresult
+ intoffset
+
+ Object oriented style (method):
+
+ result
- voidmysqli_data_seek
- resourceresult
+ bool
+ data_seek
intoffset
+
The mysqli_data_seek function seeks to an arbitrary result pointer
specified by the offset in the result set represented by
@@ -20,10 +31,19 @@
- This function can only be used with results attained from the use of the
- mysqli_store_result function.
+ This function can only be used with unbuffered results attained from the use of the
+ mysqli_store_result or mysqli_query functions.
+
+
+ Return values
+
+ &return.success;
+
+
+
+ Example
Using the mysqli_data_seek function
@@ -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);
?>
]]>
+
+
+ See also
- See also
mysqli_store_result,
- mysqli_fetch_row and
+ mysqli_fetch_row,
mysqli_num_rows.
diff --git a/reference/mysqli/functions/mysqli-debug.xml b/reference/mysqli/functions/mysqli-debug.xml
index 3f2c14f537..59dc0b70a7 100644
--- a/reference/mysqli/functions/mysqli-debug.xml
+++ b/reference/mysqli/functions/mysqli-debug.xml
@@ -1,5 +1,5 @@
-
+
mysqli_debug
@@ -16,6 +16,13 @@
operations using the Fred Fish debugging library. The debug
parameter is a string representing the debugging operation to perform.
+
+
+ Return values
+ mysqli_debug doesn't return any value.
+
+
+ Example
Generating a Trace File
@@ -32,6 +39,12 @@
+
+ See also
+
+ mysqli_dump_debug_info
+
+
+
mysqli_dump_debug_info
@@ -9,17 +9,26 @@
Description
boolmysqli_dump_debug_info
- resourcelink
+ objectlink
- 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 link parameter.
+
+
+ Return values
&return.success;
+
+ See also
+
+ mysqli_debug.
+
+
+
mysqli_errno
+ mysql->errno
Returns the error code for the most recent function call
Description
+ Procedural style:
intmysqli_errno
- resourcelink
+ objectlink
+ Object oriented style (property):
+
+ mysqli
+ interrno
+
The mysqli_errno 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 link parameter. If no errors
- have occurred, this function will return zero.
+ have occured, this function will return zero.
- 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 errmsg.h header file,
+ server error message numbers are listed in mysqld_error.h.
+ In the MySQL source distribution you can find a complete list of error messages and error numbers
+ in the file Docs/mysqld_error.txt.
+
+
+ Return values
- See also mysqli_error.
+ An error code value for the last call, if it failed. zero means no error occurred.
+
+
+
+ See also
+
+ mysqli_error, mysqli_sqlstate
diff --git a/reference/mysqli/functions/mysqli-error.xml b/reference/mysqli/functions/mysqli-error.xml
index dcb5a18ba7..6112c3f841 100644
--- a/reference/mysqli/functions/mysqli-error.xml
+++ b/reference/mysqli/functions/mysqli-error.xml
@@ -1,5 +1,5 @@
-
+
mysqli_error
@@ -7,18 +7,33 @@
Description
+ Procedural style:
stringmysqli_error
- resourcelink
+ objectlink
+ Object oriented style (property)
+
+ mysqli
+ stringerror
+
The mysqli_error function is identical to the corresponding
mysqli_errno function in every way, except instead of returning
an integer error code the mysqli_error function will return
a string representation of the last error to occur for the database connection
- represented by the link parameter. If no error has occurred,
+ represented by the link parameter. If no error has occured,
this function will return an empty string.
+
+
+ Return values
+
+ A string that describes the error. An empty string if no error occurred.
+
+
+
+ Example
Using the mysqli_error function
@@ -36,8 +51,11 @@
+
+
+ See also
- See also mysqli_errno.
+ mysqli_errno, mysqli_sqlstate.
diff --git a/reference/mysqli/functions/mysqli-execute.xml b/reference/mysqli/functions/mysqli-execute.xml
index f8c088b981..fcffbd59fd 100644
--- a/reference/mysqli/functions/mysqli-execute.xml
+++ b/reference/mysqli/functions/mysqli-execute.xml
@@ -1,21 +1,32 @@
-
+
mysqli_execute
+ stmt->execute
Executes a prepared Query
Description
+ Procedural style:
- intmysqli_execute
- resourcestmt
+ boolmysqli_execute
+ objectstmt
+ Object oriented style (method):
+
+ mysql
+
+ bool
+ execute
+ void
+
+
The mysqli_execute function executes a query that has been previously
prepared using the mysqli_prepare function represented by the
- stmt resource. When executed any parameter markers which exist will
- automatically be replaced with the appropriate data.
+ stmt object. When executed any parameter markers which exist will
+ automatically be replaced with the appropiate data.
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.
+
+
+ Return values
+ &return.success;
+
+
+ Example
Using the mysqli_execute function
@@ -68,9 +86,11 @@
+
+
+ See also
- See also
- mysqli_prepare and
+ mysqli_prepare
mysqli_bind_param.
diff --git a/reference/mysqli/functions/mysqli-fetch-array.xml b/reference/mysqli/functions/mysqli-fetch-array.xml
index 7eada51212..d8ea31f2a6 100644
--- a/reference/mysqli/functions/mysqli-fetch-array.xml
+++ b/reference/mysqli/functions/mysqli-fetch-array.xml
@@ -1,17 +1,28 @@
-
+
mysqli_fetch_array
+ result->fetch_array
Fetch a result row as an associative, a numeric array, or both.
Description
+ Procedural style:
- arraymysqli_fetch_array
- resourceresult
+ mixedmysqli_fetch_array
+ objectresult
intresulttype
+ Object oriend style (method):
+
+ result
+
+ mixed
+ fetch_array
+ intresulttype
+
+
Returns an array that corresponds to the fetched row or &false; if there are no more rows for the
database connection represented by the link parameter.
@@ -40,6 +51,15 @@
mysqli_fetch_row function. The final option MYSQLI_BOTH will create a single
array with the attributes of both.
+
+
+ Return values
+
+ Returns an array that corresponds to the fetched row or &false; if there are no more rows in resultset.
+
+
+
+ Example
mysqli_fetch_array with MYSQLI_NUM
@@ -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 @@
+
+
+ See also
- See also mysqli_fetch_assoc,
- mysqli_fetch_row and
+ mysqli_fetch_assoc,
+ mysqli_fetch_row,
mysqli_fetch_object.
diff --git a/reference/mysqli/functions/mysqli-fetch-assoc.xml b/reference/mysqli/functions/mysqli-fetch-assoc.xml
index 33569889ff..d0409e82a6 100644
--- a/reference/mysqli/functions/mysqli-fetch-assoc.xml
+++ b/reference/mysqli/functions/mysqli-fetch-assoc.xml
@@ -1,16 +1,27 @@
-
+
mysqli_fetch_assoc
+ mysqli->fetch_assoc
Fetch a result row as an associative array
Description
+ Procedural style:
arraymysqli_fetch_assoc
- resourceresult
+ objectresult
+ Object oriend style (method):
+
+ result
+
+ array
+ fetch_assoc
+ void
+
+
Returns an associative array that corresponds to the fetched row or &false; if there are
no more rows.
@@ -24,11 +35,20 @@
If two or more columns in the result set have the same column name, the associative array
returned by the mysqli_fetch_assoc 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
mysqli_fetch_row should be used which returns an numerically-indexed
array instead.
&database.field-case;
+
+
+ Return values
+
+ Returns an array that corresponds to the fetched row or &false; if there are no more rows in resultset.
+
+
+
+ Example
An expanded mysqli_fetch_assoc example
@@ -79,9 +99,12 @@
]]>
+
+
+ See also
- See also mysqli_fetch_array,
- mysqli_fetch_row and
+ mysqli_fetch_array,
+ mysqli_fetch_row,
mysqli_fetch_object.
diff --git a/reference/mysqli/functions/mysqli-fetch-field-direct.xml b/reference/mysqli/functions/mysqli-fetch-field-direct.xml
index 0fa522aaf6..aeab5b146b 100644
--- a/reference/mysqli/functions/mysqli-fetch-field-direct.xml
+++ b/reference/mysqli/functions/mysqli-fetch-field-direct.xml
@@ -1,22 +1,50 @@
-
+
mysqli_fetch_field_direct
+ result->fetch_field_direct
Fetch meta-data for a single field
Description
+ Procedural style:
- intmysqli_fetch_field_direct
- resourceresult
- intoffset
+ mixedmysqli_fetch_field_direct
+ objectresult
+ intfieldnr
-
- &warn.undocumented.func;
-
+ Object oriented style (method):
+
+ result
+
+ mixed
+ fetch_field_direct
+ intfieldnr
+
+
+
+ mysqli_fetch_field_direct returns an associative array which contains
+ field definition informations from specified resultset. The value of fieldnr must be in the
+ range from 0 to number of fields - 1.
+
+
+
+ Return values
+
+ Returns an associative array which contains field definition informations or &false; if no field information
+ for specified fieldnr is available.
+
+
+
+ See also
+
+ mysqli_num_fields
+ mysqli_fetch_field
+ mysqli_fetch_fields
+
diff --git a/reference/mysqli/functions/mysqli-fetch-field.xml b/reference/mysqli/functions/mysqli-fetch-field.xml
index e39eeacbbf..a28fb14a7e 100644
--- a/reference/mysqli/functions/mysqli-fetch-field.xml
+++ b/reference/mysqli/functions/mysqli-fetch-field.xml
@@ -1,16 +1,27 @@
-
+
mysqli_fetch_field
+ result->fetch_field
Returns the next field in the result set
Description
+ Procedural style:
+
+ mixedmysqli_fetch_field
+ objectresult
+
+ Object oriented style (method):
+
+ result
- objectmysqli_fetch_field
- resourceresult
+ mixed
+ fetch_field
+ void
+
The mysqli_fetch_field function is used to return the attributes
of the next column in the result set represented by the result
@@ -35,7 +46,7 @@
orgname
- ?
+ Original column name if an alias was specified
table
@@ -43,7 +54,7 @@
orgtable
- ?
+ Original table name if an alias was specified
def
@@ -70,6 +81,21 @@
+
+ Return values
+
+ Returns an object which contains field definition informations or &false; if no field information
+ is available.
+
+
+
+ See also
+
+ mysqli_num_fields
+ mysqli_fetch_field_direct
+ mysqli_fetch_fields
+
+
+
mysqli_fetch_fields
+ result->fetch_fields
Returns an array of objects representing the fields in a result set
Description
+ Procedural Style:
- arraymysqli_fetch_fields
- resourceresult
+ mixedmysqli_fetch_fields
+ objectresult
+ Object oriented style (method):
+
+ result
+
+ mixed
+ fetch_fields
+ intfieldnr
+
+
This function serves an identical purpose to the mysqli_fetch_field
function with the single difference that, instead of returning one object at a time for
@@ -19,6 +30,21 @@
function.
+
+ Return values
+
+ Returns an array of objects which contains field definition informations or &false; if no field information
+ is available.
+
+
+
+ See also
+
+ mysqli_num_fields
+ mysqli_fetch_field
+ mysqli_fetch_field_direct
+
+
+
mysqli_fetch_lengths
+ result->fetch_lengths
Returns the lengths of the columns of the current row in the result set
Description
-
- arraymysqli_fetch_lengths
- resourceresult
-
+ Procedural style:
+
+ mixedmysqli_fetch_lengths
+ objectresult
+
+ Object oriented style (property):
+
+ result
+ mixedfetch_lengths
+
The mysqli_fetch_lengths 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.
+
+ Return values
+
+ An array of integers representing the size of each column
+ (not including any terminating null characters). &false if an error occurred.
+
+
+ mysql_fetch_lengths 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.
+
+
+
mysqli_fetch_object
+ result->fetch_object
Returns the current row of a result set as an object
Description
+ Procedural style:
+
+ mixedmysqli_fetch_object
+ objectresult
+
+ Object oriented style (method):
+
+ result
- objectmysqli_fetch_object
- resourceresult
+ mixed
+ fetch_object
+ void
+
The mysqli_fetch_object 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.
- &database.field-case;
+
+
+ Return values
- See also mysqli_fetch_array,
- mysqli_fetch_assoc and
+ Returns an object or &false; if an error occured.
+
+ &database.field-case;
+
+
+ See also
+
+ mysqli_fetch_array,
+ mysqli_fetch_assoc,
mysqli_fetch_row.
diff --git a/reference/mysqli/functions/mysqli-fetch-row.xml b/reference/mysqli/functions/mysqli-fetch-row.xml
index 46fdd6c3ec..6da95642d3 100644
--- a/reference/mysqli/functions/mysqli-fetch-row.xml
+++ b/reference/mysqli/functions/mysqli-fetch-row.xml
@@ -1,16 +1,27 @@
-
+
mysqli_fetch_row
+ result->fetch_row
Get a result row as an enumerated array
Description
+ Procedural style:
+
+ mixedmysqli_fetch_row
+ objectresult
+
+ Object oriented style (method):
+
+ result
- arraymysqli_fetch_row
- resourceresult
+ mixed
+ fetch_row
+ void
+
Returns an array that corresponds to the fetched row, or &false; if there are no more rows.
@@ -21,9 +32,19 @@
mysqli_fetch_row function will return the next row within the result set,
or &false; if there are no more rows.
+
+
+ Return values
- See also mysqli_fetch_array,
- mysqli_fetch_assoc and
+ mysqli_fetch_row returns an array that corresponds to the fetched row
+ or &false if there are no more rows in result set.
+
+
+
+ See also
+
+ mysqli_fetch_array,
+ mysqli_fetch_assoc,
mysqli_fetch_object.
diff --git a/reference/mysqli/functions/mysqli-fetch.xml b/reference/mysqli/functions/mysqli-fetch.xml
index 11723b1e67..3b01cfafef 100644
--- a/reference/mysqli/functions/mysqli-fetch.xml
+++ b/reference/mysqli/functions/mysqli-fetch.xml
@@ -1,21 +1,74 @@
-
+
mysqli_fetch
+ stmt->fetch
Fetch results from a prepared statement into the bound variables
Description
+ Procedural style:
+
+ mixedmysqli_fetch
+ objectstmt
+
+ Object oriented style (method):
+
+ stmt
- intmysqli_fetch
- resourcestmt
+ mixed
+ fetch
+ void
-
- &warn.undocumented.func;
-
+
+
+ mysqli_fetch returns row data using the variables bound by mysqli_bind_result.
+
+
+
+ Note that all columns must be bound by the application before calling mysqli_fetch.
+
+
+
+
+ Return values
+
+ Return values
+
+
+
+ Value
+ Description
+
+
+
+
+ &true;
+ Success. Data has been fetched
+
+
+ &false;
+ Error occured
+
+
+ MYSQLI_NO_DATA
+ No more rows/data exists
+
+
+
+
+
+
+ See also
+
+ mysqli_prepare,
+ mysqli_stmt_errno,
+ mysqli_stmt_error,
+ mysqli_bind_result
+
diff --git a/reference/mysqli/functions/mysqli-field-count.xml b/reference/mysqli/functions/mysqli-field-count.xml
index bb91968686..f9de511097 100644
--- a/reference/mysqli/functions/mysqli-field-count.xml
+++ b/reference/mysqli/functions/mysqli-field-count.xml
@@ -1,16 +1,27 @@
-
+
mysqli_field_count
+ mysql->field_cont
Returns the number of columns for the most recent query
Description
+ Procedural style:
+
+ intmysqli_field_count
+ objectlink
+
+ Object oriented style (method):
+
+ mysql
- intmysqli_field_count
- resourcelink
+ int
+ field_count
+ void
+
Returns the number of columns for the most recent query on the connection
represented by the link parameter. This function
@@ -19,6 +30,10 @@
set or not without knowing the nature of the query.
+
+ Return values
+ An integer representing the number of fields in a result set
+
+
mysqli_field_seek
+ result->field_seek
Set result pointer to a specified field offset
Description
+ Procedural style:
intmysqli_field_seek
- resourcelink
+ objectresult
intfieldnr
-
- &warn.undocumented.func;
-
+ Object oriented style (method):
+
+ result
+
+ int
+ field_seek
+ intfieldnr
+
+
+
+ Sets the field cursor to the given offset. The next call to mysqli_fetch_field
+ will retrieve the field definition of the column associated with that offset.
+
+
+ To seek to the beginning of a row, pass an offset value of zero.
+
+
+
+ Return values
+
+ mysqli_field_seek returns previuos value of field cursor.
+
diff --git a/reference/mysqli/functions/mysqli-field-tell.xml b/reference/mysqli/functions/mysqli-field-tell.xml
index 78ed7d8886..9ae8b62300 100644
--- a/reference/mysqli/functions/mysqli-field-tell.xml
+++ b/reference/mysqli/functions/mysqli-field-tell.xml
@@ -1,21 +1,46 @@
-
+
mysqli_field_tell
+ result->current_field
Get current field offset of a result pointer
Description
+ Procedural style:
intmysqli_field_tell
- resourceresult
+ objectresult
-
- &warn.undocumented.func;
-
+ Object oriented style (property):
+
+ result
+
+ int
+ current_field
+
+
+
+ Returns the position of the field cursor used for the last
+ mysqli_fetch_field call. This value can
+ be used as an argument to mysqli_field_seek.
+
+
+
+ &reftitle.returnvalues;
+
+ Returns current offset of field cursor.
+
+
+
+ &reftitle.seealso;
+
+ mysqli_fetch_field,
+ mysqli_field_seek
+
diff --git a/reference/mysqli/functions/mysqli-free-result.xml b/reference/mysqli/functions/mysqli-free-result.xml
index 468f08185c..a6bd26d583 100644
--- a/reference/mysqli/functions/mysqli-free-result.xml
+++ b/reference/mysqli/functions/mysqli-free-result.xml
@@ -1,22 +1,57 @@
-
+
mysqli_free_result
+ result->free
Frees the memory associated with a result
Description
+ Procedural style:
+
+ voidmysqli_free_result
+ objectresult
+
+ Object oriented style (method):
+
+ result
- intmysqli_free_result
- resourceresult
+ void
+ free
+ void
+
The mysqli_free_result function frees the memory
associated with the result represented by the
- result parameter.
+ result parameter, which was allocated by
+ mysqli_query, mysqli_store_result
+ or mysqli_use_result.
+
+
+
+ You should always free your result with mysqli_free_result,
+ when your result object is not needed anymore.
+
+
+
+
+ &reftitle.returnvalues;
+
+ This function doesn't return any value.
+
+ &reftitle.seealso;
+
+ mysqli_query,
+ mysqli_stmt_store_result,
+ mysqli_store_result,
+ mysqli_use_result.
+
+
+
+
mysqli_get_client_info
@@ -17,6 +17,18 @@
MySQLi extension.
+
+ &reftitle.returnvalues;
+
+ A string that represents the MySQL client library version
+
+
+
+ &reftitle.seealso;
+
+ mysqli_get_client_version
+
+
+
mysqli_get_host_info
+ mysqli->get_host_info
Returns a string representing the type of connection used
Description
-
- stringmysqli_get_host_info
- resourcelink
-
+ Procdural style:
+
+ stringmysqli_get_host_info
+ objectlink
+
+ Object oriented style (property):
+
+ mysqli
+ stringhost_info
+
The mysqli_get_host_info function returns a string
describing the connection represented by the link
parameter is using (including the server host name).
+
+ &reftitle.returnvalues;
+
+ A character string representing the server hostname and the connection type.
+
+
+
+ &reftitle.seealso;
+
+ mysqli_get_proto_info
+
+
+
mysqli_get_proto_info
+ mysqli->protocol_version
Returns the version of the MySQL protocol used
Description
-
- intmysqli_get_proto_info
- resourcelink
-
+ Procedural style:
+
+ intmysqli_get_proto_info
+ objectlink
+
+ Object oriented style (property):
+
+ mysqli
+ stringprotocol_version
+
Returns an integer representing the MySQL protocol version used by the
connection represented by the link parameter.
+
+ &reftitle.returnvalues;
+
+ Returns an integer representing the protcol version.
+
+
+
+ &reftitle.seealso;
+
+ mysqli_get_host_info
+
+
+
mysqli_get_server_info
+ mysqli->server_info
Returns the version of the MySQL server
Description
-
- stringmysqli_get_server_info
- resourcelink
-
+ Procedural style:
+
+ stringmysqli_get_server_info
+ objectlink
+
+ Object oriented style (property):
+
+ mysqli
+ stringserver_info
+
Returns a string representing the version of the MySQL server that the
MySQLi extension is connected to (represented by the
link parameter).
+
+ &reftitle.returnvalues;
+
+ A character string representing the server version.
+
+
+
+ &reftitle.seealso;
+
+ mysqli_get_server_version
+
+
+
mysqli_get_server_version
@@ -7,18 +7,39 @@
Description
+ Procedural style:
intmysqli_get_server_version
- resourcelink
+ objectlink
+ Object oriented style (property):
+
+ mysqli
+ intserver_version
+
The mysqli_get_server_version function returns the
version of the server connected to (represented by the
- link parameter) as an integer. The form of this
- version number is main_version * 10000 + minor_version * 100 + sub_version
+ link parameter) as an integer.
+
+
+ The form of this version number is
+ main_version * 10000 + minor_version * 100 + sub_version
(i.e. version 4.1.0 is 40100).
+
+ &reftitle.returnvalues;
+
+ An integer representing the server version.
+
+
+
+ &reftitle.seealso;
+
+ mysqli_get_server_info
+
+
+
mysqli_info
+ mysqli->info
Retrieves information about the most recently executed query
Description
+ Procedural style:
stringmysqli_info
- resourcelink
+ objectlink
+ Object oriented style (property)
+
+ mysqli
+ stringinfo
+
The mysqli_info function returns a string providing
information about the last query executed. The nature of this string is
@@ -54,10 +61,24 @@
Queries which do not fall into one of the above formats are not supported.
- In these situations, mysqli_info will return &false;
+ In these situations, mysqli_info will return an empty string.
+
+ &reftitle.returnvalues;
+
+ A character string representing additional information about the most recently executed query.
+
+
+
+ &reftitle.seealso;
+
+ mysqli_affected_rows,
+ mysqli_warning_count,
+ mysqli_num_rows
+
+
+
mysqli_init
- Initializes MySQLi and returns a resource for use with mysqli_real_connect
+ Initializes MySQLi and returns an object for use with mysqli_real_connect
Description
- resourcemysqli_init
+ objectmysqli_init
-
- &warn.undocumented.func;
-
+
+ Allocates or initializes a MYSQL object suitable for
+ mysqli_options and mysqli_real_connect.
+
+
+
+ Any subsequent calls to any mysqli function (except mysqli_options)
+ will fail until mysqli_real_connect was called.
+
+
+
+
+ &reftitle.returnvalues;
+
+ Returns an object.
+
+
+
+ &reftitle.seealso;
+
+ mysqli_options,
+ mysqli_close,
+ mysqli_real_connect,
+ mysqli_connect
+
diff --git a/reference/mysqli/functions/mysqli-insert-id.xml b/reference/mysqli/functions/mysqli-insert-id.xml
index 03716991d0..9a04615fac 100644
--- a/reference/mysqli/functions/mysqli-insert-id.xml
+++ b/reference/mysqli/functions/mysqli-insert-id.xml
@@ -1,16 +1,23 @@
-
+
mysqli_insert_id
+ mysqli->insert_id
Returns the auto generated id used in the last query
Description
+ Procedural style:
mixedmysqli_insert_id
- resourcelink
+ objectlink
+ Object oriented style (property):
+
+ mysqli
+ mixedinsert_id
+
The mysqli_insert_id function returns the ID generated
by a query on a table with a column having the AUTO_INCREMENT attribute. If
@@ -26,7 +33,22 @@
-
+
+ &reftitle.returnvalues;
+
+ The value of the AUTO_INCREMENT 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 AUTO_INCREMENT
+ value.
+
+
+
+ If the number is greater than maximal int value, mysqli_insert_id
+ will return a string.
+
+
+
+
+
mysqli_kill
+ mysqli->kill
Asks the server to kill a MySQL thread
Description
+ Procedural style:
boolmysqli_kill
- resourcelink
+ objectlink
intprocessid
-
+ Object oriented style (method)
+
+ mysqli
+
+ bool
+ kill
+ intprocessid
+
+
+
This function is used to ask the server to kill a MySQL thread specified
by the processid parameter. This value must be
retrieved by calling the mysqli_thread_id function.
+
+
+ To stop a running query you should use the SQL command
+ KILL QUERY processid.
+
+
+
+
+ &reftitle.returnvalues;
+ &return.success;
+
+
+ &reftitle.seealso;
+
+ mysqli_thread_id
+
diff --git a/reference/mysqli/functions/mysqli-num-fields.xml b/reference/mysqli/functions/mysqli-num-fields.xml
index b15491ed61..a294bcbfa9 100644
--- a/reference/mysqli/functions/mysqli-num-fields.xml
+++ b/reference/mysqli/functions/mysqli-num-fields.xml
@@ -1,21 +1,38 @@
-
+
mysqli_num_fields
+ result->num_fields
Get the number of fields in a result
Description
+ Procedural style:
intmysqli_num_fields
- resourceresult
+ objectresult
-
- &warn.undocumented.func;
-
+ Object oriented style (property):
+
+ mysqli
+ intfield_count
+
+
+ mysqli_num_fields returns the number of fields from specified result set.
+
+
+
+ &reftitle.returnvalues;
+ The number of fields from a result set
+
+
+ &reftitle.seealso;
+
+ mysqli_fetch_field
+
diff --git a/reference/mysqli/functions/mysqli-num-rows.xml b/reference/mysqli/functions/mysqli-num-rows.xml
index c753ef1e73..0ddc40865e 100644
--- a/reference/mysqli/functions/mysqli-num-rows.xml
+++ b/reference/mysqli/functions/mysqli-num-rows.xml
@@ -1,5 +1,5 @@
-
+
mysqli_num_rows
@@ -9,13 +9,47 @@
Description
+ Procedural style:
- intmysqli_num_rows
- resourceresult
+ mixedmysqli_num_rows
+ objectresult
-
- &warn.undocumented.func;
-
+ Object oriented style (property):
+
+ mysqli
+ mixednum_rows
+
+
+ Returns the number of rows in the result set.
+
+
+ The use of mysqli_num_rows depends on whether you use
+ buffered or unbuffered result sets.
+ In case you use unbuffered resultsets mysqli_num_rows
+ will not correct the correct number of rows until all the rows in the result
+ have been retrieved.
+
+
+
+ &reftitle.returnvalues;
+
+ Returns number of rows in the result set.
+
+
+
+ If the number of rows is greater than maximal int value, the number
+ will be returned as a string.
+
+
+
+
+ &reftitle.seealso;
+
+ mysqli_affected_rows
+ mysqli_store_result
+ mysqli_use_result
+ mysqli_query
+
diff --git a/reference/mysqli/functions/mysqli-options.xml b/reference/mysqli/functions/mysqli-options.xml
index 8c80f9055d..13960059ff 100644
--- a/reference/mysqli/functions/mysqli-options.xml
+++ b/reference/mysqli/functions/mysqli-options.xml
@@ -1,21 +1,99 @@
-
+
mysqli_options
+ mysqli->options
set options
Description
+ Procedural style:
boolmysqli_options
- resourcelink
- intflags
- mixedvalues
+ objectlink
+ intoption
+ mixedvalue
-
- &warn.undocumented.func;
-
+ Object oriented style (method)
+
+ mysqli
+
+ bool
+ options
+ intoption
+ mixedvalue
+
+
+
+ mysqli_options can be used to set extra connect options
+ and affect behavior for a connection.
+
+
+ This function may be called multiple times to set several options.
+
+
+ mysqli_options should be called after mysqli_init
+ and before mysqli_real_connect.
+
+
+ The parameter option is the option that you want to set,
+ the value is the value for the option.
+ The parameter option can be one of the following values:
+
+ Valid options
+
+
+
+ Name
+ Description
+
+
+
+
+ MYSQLI_OPT_CONNECT_TIMEOUT
+ connection timeout in seconds
+
+
+ MYSQLI_OPT_COMPRESS
+ use compression protocol
+
+
+ MYSQLI_OPT_LOCAL_INFILE
+ enable/disable use of LOAD LOCAL INFILE
+
+
+ MYSQLI_INIT_CMD
+ command to execute after when connecting to MySQL server
+
+
+ MYSQLI_READ_DEFAULT_FILE
+
+ Read options from named option file instead of my.cnf
+
+
+
+ MYSQLI_READ_DEFAULT_GROUP
+
+ Read options from the named group from my.cnf
+ or the file specified with MYSQL_READ_DEFAULT_FILE.
+
+
+
+
+
+
+
+
+ &reftitle.returnvalues;
+ &return.success;
+
+
+ &reftitle.seealso;
+
+ mysqli_init,
+ mysqli_real_connect
+
diff --git a/reference/mysqli/functions/mysqli-param-count.xml b/reference/mysqli/functions/mysqli-param-count.xml
index 01db8dfb0e..d03e8d7d02 100644
--- a/reference/mysqli/functions/mysqli-param-count.xml
+++ b/reference/mysqli/functions/mysqli-param-count.xml
@@ -1,19 +1,38 @@
-
+
mysqli_param_count
+ stmt->param_count
Returns the number of parameter for the given statement
Description
+ Procedural style:
intmysqli_param_count
- resourcestmt
+ objectstmt
-
- &warn.undocumented.func;
-
+ Object oriented style (property):
+
+ stmt
+ intparam_count
+
+
+ mysqli_param_count returns the number of parameter
+ markers present in the prepared statement.
+
+
+ &reftitle.returnvalues;
+
+ returns an integer representing the number of parameters.
+
+
+
+ &reftitle.seealso;
+
+ mysqli_prepare
+
diff --git a/reference/mysqli/functions/mysqli-ping.xml b/reference/mysqli/functions/mysqli-ping.xml
index 30686a8d4f..060dd8618a 100644
--- a/reference/mysqli/functions/mysqli-ping.xml
+++ b/reference/mysqli/functions/mysqli-ping.xml
@@ -1,21 +1,41 @@
-
+
mysqli_ping
+ mysqli->ping
- 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.
Description
+ Procedural style:
+
+ intmysqli_ping
+ objectlink
+
+ Object oriented style (method):
+
+ mysqli
- intmysqli_ping
- resourcelink
+ intping
+ void
-
- &warn.undocumented.func;
-
+
+
+ Checks whether the connection to the server is working. If it has gone
+ down, an automatic reconnection is attempted.
+
+
+ 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.
+
+
+ mysqli_ping returns 0 if the connection is alive
+ and non-zero value if an error has occured.
+
diff --git a/reference/mysqli/functions/mysqli-prepare.xml b/reference/mysqli/functions/mysqli-prepare.xml
index a618a0cfdd..495b9849c4 100644
--- a/reference/mysqli/functions/mysqli-prepare.xml
+++ b/reference/mysqli/functions/mysqli-prepare.xml
@@ -1,22 +1,84 @@
-
+
mysqli_prepare
+ stmt->prepare
Prepare a SQL statement for execution
Description
+ Procedure style:
- resourcemysqli_prepare
- resourcelink
+ mixedmysqli_prepare
+ objectlink
stringquery
-
- &warn.undocumented.func;
-
+ Object oriented style (method)
+
+ stmt
+
+ mixed
+ prepare
+ stringquery
+
+
+
+ mysqli_prepare 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.
+
+
+
+ You should not add a terminating semicolon or \g
+ to the statement.
+
+
+
+ The parameter query can include one or more parameter markers
+ in the SQL statement by embedding question mark (?) characters
+ at the appropriate positions.
+
+
+
+ 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.
+
+
+ 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 =
+ 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.
+
+
+
+ The parameter markers must be bound to application variables using
+ mysqli_bind_param and/or mysqli_bind_result
+ before executing the statement or fetching rows.
+
+
+
+ &reftitle.returnvalues;
+
+ mysqli_prepare returns a statement object or &false; if an error occured.
+
+
+
+ &reftitle.seealso;
+
+ mysqli_execute
+ mysqli_fetch
+ mysqli_bind_param
+ mysqli_bind_result
+ mysqli_stmt_close
+
diff --git a/reference/mysqli/functions/mysqli-query.xml b/reference/mysqli/functions/mysqli-query.xml
index c23179b514..6151e794b7 100644
--- a/reference/mysqli/functions/mysqli-query.xml
+++ b/reference/mysqli/functions/mysqli-query.xml
@@ -1,30 +1,66 @@
-
+
mysqli_query
+ mysqli->query
Performs a query on the database
Description
+ Procedural style:
+
+ mixedmysqli_query
+ objectlink
+ stringquery
+ intresultmode
+
+ Object oriented style (method):
+
+ mysqli
- resourcemysqli_query
- resourcelink
+ mixed
+ query
stringquery
- intresultmode
+
The mysqli_query function is used to simplify the
act of performing a query against the database represented by the
- link parameter. Functionally, using this
+ link parameter.
+
+
+ Functionally, using this
function is identical to calling mysqli_real_query
followed either by mysqli_use_result or
mysqli_store_result where query
is the query string itself and resultmode is
- either the constant MYSQLI_USE_RESULT or MYSQLI_STORE_RESULT depending
+ either the constant MYSQLI_USE_RESULT or
+ MYSQLI_STORE_RESULT depending
on the desired behavior. By default, if the
- resultmode is not provided MYSQLI_STORE_RESULT
- is used.
+ resultmode is not provided
+ MYSQLI_STORE_RESULT is used.
+
+
+ If you execute mysqli_query with resultmode
+ MYSQLI_USE_RESULT all subsequent calls will return error
+ Commands out of sync unless you call mysqli_free_result.
+
+
+
+ Return values
+
+ &return.success; For SELECT, SHOW, DESCRIBE or
+ EXPLAIN mysqli_query will return
+ a result object.
+
+
+
+ See also
+
+ mysqli_real_query,
+ mysqli_multi_query,
+ mysqli_free_result
diff --git a/reference/mysqli/functions/mysqli-real-connect.xml b/reference/mysqli/functions/mysqli-real-connect.xml
index 34ec6a49fe..deaf54d0e6 100644
--- a/reference/mysqli/functions/mysqli-real-connect.xml
+++ b/reference/mysqli/functions/mysqli-real-connect.xml
@@ -1,28 +1,119 @@
-
+
mysqli_real_connect
+ mysqli->real_connect
Opens a connection to a mysql server
Description
+ Procedural style
boolmysqli_real_connect
- resourcelink
+ objectlink
stringhostname
stringusername
stringpasswd
stringdbname
intport
stringsocket
+ intflags
-
- &warn.undocumented.func;
-
+ Object oriented style (method)
+
+ mysqli
+
+ bool
+ real_connect
+ stringhostname
+ stringusername
+ stringpasswd
+ stringdbname
+ intport
+ stringsocket
+ intflags
+
+
- See also
- mysqli_connect and
+ mysql_real_connect() attempts to establish a connection to a MySQL database engine running on host.
+
+
+ This function differs from mysqli_connect:
+
+
+
+
+ mysqli_real_connect needs a valid object which has to be created by function
+ mysqli_init
+
+
+
+
+ With function mysqli_options you can set various options for connection.
+
+
+
+
+ With the parameter flags you can set diffrent connection options:
+
+
+ Supported flags
+
+
+
+ Name
+ Description
+
+
+
+
+ MYSQLI_CLIENT_COMPRESS
+ Use compression protocol
+
+
+ MYSQLI_CLIENT_FOUND_ROWS
+ return number of matched rows, not the number of affected rows
+
+
+ MYSQLI_CLIENT_IGNORE_SPACE
+ Allow spaces after function names. Makes all function names reserved words.
+
+
+ MYSQLI_CLIENT_INTERACTIVE
+
+ Allow interactive_timeout seconds (instead of
+ wait_timeout seconds) of inactivity before closing the connection
+
+
+
+ MYSQLI_CLIENT_SSL
+ Use SSL (encryption)
+
+
+
+
+
+
+ For security reasons the MULTI_STATEMENT flag is not supported in
+ PHP. If you want to execute multiple queries use the
+ mysqli_multi_query function.
+
+
+
+
+
+
+ &reftitle.returnvalues;
+ &return.success;
+
+
+ &reftitle.seealso;
+
+ mysqli_connect,
+ mysqli_init,
+ mysqli_options,
+ mysqli_ssl_set,
mysqli_close.
diff --git a/reference/mysqli/functions/mysqli-real-escape-string.xml b/reference/mysqli/functions/mysqli-real-escape-string.xml
index 39e12545a7..7dd1d5f042 100644
--- a/reference/mysqli/functions/mysqli-real-escape-string.xml
+++ b/reference/mysqli/functions/mysqli-real-escape-string.xml
@@ -1,8 +1,9 @@
-
+
mysqli_real_escape_string
+ mysqli->real_escape_string
Escapes special characters in a string for use in a SQL statement,
taking into account the current charset of the connection
@@ -10,17 +11,41 @@
Description
+ Procedural style:
stringmysqli_real_escape_string
- resourcelink
+ objectlink
stringescapestr
-
- &warn.undocumented.func;
-
+ Object oriented style (method):
+
+ mysqli
+
+ string
+ real_escape_sring
+ stringquery
+
+
- See also mysqli_character_set_name.
+ This function is used to create a legal SQL string that you can use in a SQL statement.
+ The string escapestr is encoded to an escaped SQL string, taking into
+ account the current character set of the connection.
+
+ Characters encoded are NUL (ASCII 0), \n, \r, \, ', ", and Control-Z.
+
+
+
+ Return values
+
+ Returns an escaped string.
+
+
+
+ See also
+
+ mysqli_character_set_name.
+
diff --git a/reference/mysqli/functions/mysqli-real-query.xml b/reference/mysqli/functions/mysqli-real-query.xml
index 1faa625d2b..5fb1a2d964 100644
--- a/reference/mysqli/functions/mysqli-real-query.xml
+++ b/reference/mysqli/functions/mysqli-real-query.xml
@@ -1,17 +1,28 @@
-
+
mysqli_real_query
+ mysqli->real_query
Execute an SQL query
Description
+ Procedural style
boolmysqli_real_query
- resourcelink
+ objectlink
stringquery
+ Object oriented style (method):
+
+ mysqli
+
+ bool
+ real_query
+ stringquery
+
+
The mysqli_real_query function is used to execute
only a query against the database represented by the link
@@ -26,6 +37,20 @@
+
+ Return values
+
+ &return.success;
+
+
+
+ See also
+
+ mysqli_query
+ mysqli_store_result
+ mysqli_use_result
+
+
+
mysqli_rollback
-
+ mysqli->rollback
+ Rolls back current transaction
Description
boolmysqli_rollback
- resourcelink
+ objectlink
-
- &warn.undocumented.func;
-
+
+ mysqli
+
+ bool
+ rollback
+ void
+
+
+
+ Rollbacks the current transaction for the database specified by the
+ link parameter.
+
+
+
+ Return values
+
+ &return.success;
+
+
+
+ See also
+
+ mysqli_commit
+ mysqli_autocommit
+
diff --git a/reference/mysqli/functions/mysqli-select-db.xml b/reference/mysqli/functions/mysqli-select-db.xml
index 5f601d5b9d..cdbe61c3fb 100644
--- a/reference/mysqli/functions/mysqli-select-db.xml
+++ b/reference/mysqli/functions/mysqli-select-db.xml
@@ -1,15 +1,16 @@
-
+
mysqli_select_db
+ mysqli->select_db
Selects the default database for database queries
Description
boolmysqli_select_db
- resourcelink
+ objectlink
stringdbname
@@ -18,10 +19,26 @@
used when performing queries against the database connection
represented by the link parameter.
+
+
+ This function should only be used to change the default database for the connection.
+ You can select the default database with 4th parameter in mysqli_connect.
+
+
+
+
+ Return values
&return.success;
+
+ See also
+
+ mysqli_connect
+ mysqli_real_connect
+
+
+
mysqli_send_long_data
-
+ stmt->send_long_data
+ Send data in blocks
Description
+ Procedural style:
boolmysqli_send_long_data
- resourcestmt
+ objectstmt
intparam_nr
stringdata
-
- &warn.undocumented.func;
-
+ Object oriented style (method)
+
+ stmt
+
+ boolsend_long_data
+ intparam_nr
+ stringdata
+
+
+
+ Allows to send parameter data to the server in pieces (or chunks), e.g. if the
+ size of a blob exceeds the size of max_allowed_packet.
+ 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.
+
+
+ param_nr indicates which parameter to associate the data with.
+ Parameters are numbered beginning with 0. data is a string containing data to be sent.
+
+
+
+ Return values
+ &return.success;
+
+
+ See also
+
+ mysqli_prepare,
+ mysqli_bind_param
+
diff --git a/reference/mysqli/functions/mysqli-ssl-set.xml b/reference/mysqli/functions/mysqli-ssl-set.xml
index eec2228c7a..4d17ec552b 100644
--- a/reference/mysqli/functions/mysqli-ssl-set.xml
+++ b/reference/mysqli/functions/mysqli-ssl-set.xml
@@ -1,24 +1,66 @@
-
+
mysqli_ssl_set
-
+ mysqli->ssl_set
+ Used for establishing secure connections using SSL.
Description
+ Procedural style:
+
+ boolmysqli_ssl_set
+ objectlink
+ stringkey
+ stringcert
+ stringca
+ stringcapath
+ stringcipher
+
+ Object oriented style (method):
+
+ mysqli
- stringmysqli_ssl_set
- resourcelink
+ boolssl_set
stringkey
stringcert
stringca
stringcapath
stringcipher
-
- &warn.undocumented.func;
-
+
+
+ The function mysqli_ssl_set is used for establishing
+ secure connections using SSL. It must be called before
+ mysqli_real_connect. This function does nothing
+ unless OpenSSL support is enabled.
+
+
+ key is the pathname to the key file.
+ cert is the pathname to the certificate file.
+ ca is the pathname to the certificate authority file.
+ capath is the pathname to a directory that contains
+ trusted SSL CA certificates in pem format.
+ cipher is a list of allowable ciphers to use for
+ SSL encryption.
+ Any unused SSL parameters may be given as &null;
+
+
+
+ Return values
+
+ This function always returns &true; value. If SSL setup is
+ incorrect mysqli_real_connect will return an error
+ when you attempt to connect.
+
+
+
+ See also
+
+ mysqli_options,
+ mysqli_real_connect
+
diff --git a/reference/mysqli/functions/mysqli-stat.xml b/reference/mysqli/functions/mysqli-stat.xml
index 313942d0c8..333eda5387 100644
--- a/reference/mysqli/functions/mysqli-stat.xml
+++ b/reference/mysqli/functions/mysqli-stat.xml
@@ -1,21 +1,44 @@
-
+
mysqli_stat
-
- Gets the current system status
-
+ mysqli->stat
+ Gets the current system status
Description
+ Procedural style:
+
+ stringmysqli_stat
+ objectlink
+
+ Object oriented style (method):
+
+ mysqli
- stringmysqli_stat
- resourcelink
+ stringmysqli->stat
+ void
-
- &warn.undocumented.func;
-
+
+
+ mysqli_stat 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.
+
+
+
+ Return values
+
+ A string describing the server status. &false; if an error occurred.
+
+
+
+ See also
+
+ mysqli_get_server_info
+
diff --git a/reference/mysqli/functions/mysqli-stmt-affected-rows.xml b/reference/mysqli/functions/mysqli-stmt-affected-rows.xml
index 27bd767303..52c22a5f5b 100644
--- a/reference/mysqli/functions/mysqli-stmt-affected-rows.xml
+++ b/reference/mysqli/functions/mysqli-stmt-affected-rows.xml
@@ -1,19 +1,62 @@
-
+
mysqli_stmt_affected_rows
-
+ mysqli_stmt->affected_rows
+ Returns the total number of rows changed, deleted, or
+ inserted by the last executed statement
+
Description
-
- mixedmysqli_stmt_affected_rows
- objectstmt
-
-
- &warn.undocumented.func;
-
+ Procedural style :
+
+ mixedmysqli_stmt_affected_rows
+ objectstmt
+
+ Object oriented style (property):
+
+ stmt
+ mixedaffected_rows
+
+
+ mysqli_stmt_affected_rows returns the number of rows affected
+ by INSERT, UPDATE, or DELETE query. If the last query was invalid, this function will return -1.
+
+
+
+ For SELECT statements mysqli_affected_rows works like
+ mysqli_num_rows.
+
+
+
+ The mysqli_stmt_affected_rows function only works with queries
+ which update a table. In order to return the number of rows from a SELECT query, use
+ the mysqli_stmt_num_rows function instead.
+
+
+
+ Return Values
+
+ 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.
+
+
+
+ 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.
+
+
+
+
+ See also
+
+ mysqli_stmt_num_rows,
+ mysqli_prepare
+
diff --git a/reference/mysqli/functions/mysqli-stmt-close.xml b/reference/mysqli/functions/mysqli-stmt-close.xml
index 06cc1f5bb1..d6ca2da02c 100644
--- a/reference/mysqli/functions/mysqli-stmt-close.xml
+++ b/reference/mysqli/functions/mysqli-stmt-close.xml
@@ -1,19 +1,44 @@
-
+
mysqli_stmt_close
- close statement
+ mysqli_stmt->close
+ Closes a prepared statement
Description
+ Procedural style:
+
+ boolmysqli_stmt_close
+ objectstmt
+
+ Object oriented style (method):
+
+ mysqli_stmt
- boolmysqli_stmt_close
- resourcestmt
-
-
- &warn.undocumented.func;
-
+ boolmysqli_stmt->close
+ void
+
+
+
+ Closes a prepared statement. mysql_stmt_close 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.
+
+
+
+ Return values
+ &return.success;
+
+
+ See also
+
+ mysqli_stmt_num_rows,
+ mysqli_prepare,
+ mysqli_execute
+
diff --git a/reference/mysqli/functions/mysqli-stmt-errno.xml b/reference/mysqli/functions/mysqli-stmt-errno.xml
index ce1ff265b4..1c322e380c 100644
--- a/reference/mysqli/functions/mysqli-stmt-errno.xml
+++ b/reference/mysqli/functions/mysqli-stmt-errno.xml
@@ -1,19 +1,48 @@
-
+
mysqli_stmt_errno
-
+ mysqli_stmt->errno
+ Returns the error code for the most recent statement call
Description
-
- intmysqli_stmt_errno
- resourcestmt
-
-
- &warn.undocumented.func;
-
+ Procedural style :
+
+ intmysqli_stmt_errno
+ objectstmt
+
+ Object oriented style (property):
+
+ stmt
+ interrno
+
+
+ For the statement specified by stmt, mysqli_stmt_errno()
+ returns the error code for the most recently invoked statement function that can succeed or fail.
+
+
+
+ Client error message numbers are listed in the MySQL errmsg.h header file,
+ server error message numbers are listed in mysqld_error.h.
+ In the MySQL source distribution you can find a complete list of error messages and error numbers
+ in the file Docs/mysqld_error.txt.
+
+
+
+
+ Return values
+
+ An error code value. Zero means no error occurred.
+
+
+
+ See also
+
+ mysqli_stmt_error,
+ mysqli_stmt_sqlstate
+
diff --git a/reference/mysqli/functions/mysqli-stmt-error.xml b/reference/mysqli/functions/mysqli-stmt-error.xml
index a761addc40..527616f2d5 100644
--- a/reference/mysqli/functions/mysqli-stmt-error.xml
+++ b/reference/mysqli/functions/mysqli-stmt-error.xml
@@ -1,20 +1,43 @@
-
+
mysqli_stmt_error
-
+ mysqli_stmt->error
+ Returns a string description for last statement error
Description
-
- stringmysqli_stmt_error
- resourcestmt
-
-
- &warn.undocumented.func;
-
+ Procedural style:
+
+ stringmysqli_stmt_error
+ objectstmt
+
+ Object oriented style (property):
+
+ stmt
+ stringerror
+
+
+ For the statement specified by stmt, mysql_stmt_error
+ returns a containing the error message for the most recently invoked statement function that
+ can succeed or fail.
+
+
+ Return values
+
+ A string that describes the error. An empty string if no error occurred.
+
+
+
+ See also
+
+ mysqli_stmt_errno,
+ mysqli_stmt_sqlstate
+
+
+
+
mysqli_stmt_store_result
-
+ mysqli_stmt->store_result
+ Transfers a result set from a prepared statement
Description
+ Procedural style:
+
+ boolmysqli_stmt_store_result
+ objectstmt
+
+ Object oriented style (method):
+
+ mysqli_stmt
- resourcemysqli_stmt_store_result
- resourcestmt
+ boolstore_result
+ void
-
- &warn.undocumented.func;
-
+
+
+ You must call mysql_stmt_store_result for every query that
+ successfully produces a result set (SELECT, SHOW, DESCRIBE, EXPLAIN),
+ and only if you want to buffer the complete result set by the client,
+ so that the subsequent mysql_fetch call returns buffered data.
+
+
+
+ It is unnecessary to call mysql_stmt_store_result() 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
+ mysql_get_metadata returns NULL.
+
+
+
+
+ Return values
+ &return.success;
+
+
+ See also
+
+ mysqli_prepare,
+ mysqli_get_metadata,
+ mysqli_fetch
+
diff --git a/reference/mysqli/functions/mysqli-store-result.xml b/reference/mysqli/functions/mysqli-store-result.xml
index a0d8d0f2cd..e0218ed269 100644
--- a/reference/mysqli/functions/mysqli-store-result.xml
+++ b/reference/mysqli/functions/mysqli-store-result.xml
@@ -1,16 +1,27 @@
-
+
mysqli_store_result
+ mysqli->store_result
Transfers a result set from the last query
Description
+ Procedural style:
+
+ objectmysqli_store_result
+ objectlink
+
+ Object oriented style (method):
+
+ mysqli
- resourcemysqli_store_result
- resourcelink
+ object
+ store_result
+ void
+
Transfers the result set from the last query on the database connection
represented by the link parameter to be used with
@@ -20,10 +31,39 @@
Although it is always good practice to free the memory used by the result of
a query using the mysqli_free_result function, when
- transferring large result sets using the mysqli_store_result
+ transfering large result sets using the mysqli_store_result
this becomes particularly important.
+
+
+ mysqli_store_result 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 mysqli_error doesn't return an empty string, if
+ mysqli_errno returns a non zero value, or if
+ mysqli_field_count returns a non zero value.
+ Also possible reason for this function returning &false; after
+ successfull call to mysqli_query can be too large
+ result set (memory for it cannot be allocated). If
+ mysqli_field_count returns a non-zero value, the
+ statement should have produced a non-empty result set.
+
+
+
+
+ Return values
+
+ Returns a buffered result object or &false; if an error occured.
+
+
+
+ See also
+
+ mysqli_real_query,
+ mysqli_use_result.
+
diff --git a/reference/mysqli/functions/mysqli-thread-id.xml b/reference/mysqli/functions/mysqli-thread-id.xml
index 62901ff12b..4a26d38d98 100644
--- a/reference/mysqli/functions/mysqli-thread-id.xml
+++ b/reference/mysqli/functions/mysqli-thread-id.xml
@@ -1,20 +1,29 @@
-
+
mysqli_thread_id
+ mysqli->thread_id
Returns the thread ID for the current connection
Description
-
- intmysqli_thread_id
- resourcelink
-
+ Procedural style:
+
+ intmysqli_thread_id
+ objectlink
+
+ Object oriented style (property):
+
+ mysqli
+ intthread_id
+
The mysqli_thread_id function returns the thread
ID for the current connection which can then be killed using the
- mysqli_kill function.
+ mysqli_kill function. If the connection is lost
+ and you reconnect with mysqli_ping, the thread ID
+ will be other. Therefore you should get the thread ID only when you need it.
@@ -22,8 +31,23 @@
if the connection is broken and then re-established a new thread ID
will be assigned.
+
+ To kill a running query you can use the SQL command KILL QUERY processid].
+
+
+ Return values
+
+ mysqli_thread_id returns the Thread ID for the current connection.
+
+
+
+ See also
+
+ mysqli_kill
+
+
+
mysqli_thread_safe
-
- Returns whether thread safety is given or not
-
+ Returns whether thread safety is given or not
Description
-
- boolmysqli_thread_safe
- void
-
-
- &warn.undocumented.func;
-
+ Procedural style:
+
+ boolmysqli_thread_safe
+ void
+
+
+ mysqli_thread_safe indicates whether the
+ client library is compiled as thread-safe.
+
+
+
+ Return values
+
+ &true; if the client library is thread-safe, otherwise &false;.
+
diff --git a/reference/mysqli/functions/mysqli-use-result.xml b/reference/mysqli/functions/mysqli-use-result.xml
index eed2f052a3..1c0eb18c27 100644
--- a/reference/mysqli/functions/mysqli-use-result.xml
+++ b/reference/mysqli/functions/mysqli-use-result.xml
@@ -1,16 +1,27 @@
-
+
mysqli_use_result
+ mysqli->use_result
Initiate a result set retrieval
Description
+ Procedural style:
+
+ mixedmysqli_use_result
+ objectlink
+
+ Object oriented style (method):
+
+ mysqli
- resourcemysqli_use_result
- resourcelink
+ mixed
+ use_result
+ void
+
mysqli_use_result 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 mysqli_data_seek to move to a particular
row within the set. To use this functionality, the result set must be
- stored using mysqli_store_result
+ stored using mysqli_store_result. One should not
+ use mysqli_use_result 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.
+
+
+ Return values
- See also
- mysqli_real_query and
+ Returns an unbuffered result object or &false; if an error occured.
+
+
+
+ See also
+
+ mysqli_real_query,
mysqli_store_result.
diff --git a/reference/mysqli/functions/mysqli-warning-count.xml b/reference/mysqli/functions/mysqli-warning-count.xml
index 0afb504daa..70b4eefd27 100644
--- a/reference/mysqli/functions/mysqli-warning-count.xml
+++ b/reference/mysqli/functions/mysqli-warning-count.xml
@@ -1,23 +1,48 @@
-
+
mysqli_warning_count
-
- Returns the number of warnings from the last query for the given link
-
+ mysqli->warning_count
+ Returns the number of warnings from the last query for the given link
Description
-
- resourcemysqli_warning_count
- resourcelink
-
+ Procedural style:
+
+ intmysqli_warning_count
+ objectlink
+
+ Object oriented style (property):
+
+ mysqli
+ intwarning_count
+
mysqli_warning_count returns the number of warnings
from the last query in the connection represented by the
link parameter.
+
+
+ For retrieving warning messages you can use the SQL command
+ SHOW WARNINGS [limit row_count].
+
+
+
+
+ Return values
+
+ Number of warnings or zero if there are no warnings.
+
+
+
+ See also
+
+ mysqli_errno,
+ mysqli_error,
+ mysqli_sqlstate
+