diff --git a/reference/mysqli/functions/mysqli-character-set-name.xml b/reference/mysqli/functions/mysqli-character-set-name.xml index c93aa4ade1..f8cc50028c 100644 --- a/reference/mysqli/functions/mysqli-character-set-name.xml +++ b/reference/mysqli/functions/mysqli-character-set-name.xml @@ -1,47 +1,47 @@ - - - - mysqli_character_set_name - mysqli->character_set_name - Returns the default character set for the database connection - - - Description - Procedural style: - - stringmysqli_character_set_name - mysqlilink - - Object oriented style (method): - - mysqli - - stringcharacter_set_name - - - - - Returns the current character set for the database connection specified by the - link parameter. - - - - &reftitle.returnvalues; - The default character set for the current connection - - - &reftitle.seealso; - - mysqli_client_encoding&listendand; - mysqli_real_escape_string. - - - - &reftitle.examples; - - Object oriented style - + + + + mysqli_character_set_name + mysqli->character_set_name + Returns the default character set for the database connection + + + Description + Procedural style: + + stringmysqli_character_set_name + mysqlilink + + Object oriented style (method): + + mysqli + + stringcharacter_set_name + + + + + Returns the current character set for the database connection specified by the + link parameter. + + + + &reftitle.returnvalues; + The default character set for the current connection + + + &reftitle.seealso; + + mysqli_client_encoding&listendand; + mysqli_real_escape_string. + + + + &reftitle.examples; + + Object oriented style + close(); ?> ]]> - - - - Procedural style - + + + + Procedural style + ]]> - - - &example.outputs; - + + + &example.outputs; + - - - + + + - - - mysqli_options - mysqli->options - Set options - - - Description - Procedural style: - - boolmysqli_options - mysqlilink - intoption - mixedvalue - - Object oriented style (method) - - mysqli - - booloptions - 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_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&listendand; - mysqli_real_connect. - - - - &reftitle.examples; - See mysqli_real_connect. - -
+ + + + mysqli_options + mysqli->options + Set options + + + Description + Procedural style: + + boolmysqli_options + mysqlilink + intoption + mixedvalue + + Object oriented style (method) + + mysqli + + booloptions + 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_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&listendand; + mysqli_real_connect. + + + + &reftitle.examples; + See mysqli_real_connect. + +
- - - 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 - - - - Description - Procedural style: - - stringmysqli_real_escape_string - mysqlilink - stringescapestr - - Object oriented style (method): - - mysqli - - stringreal_escape_string - stringescapestr - - - - 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. - - - - &reftitle.returnvalues; - - Returns an escaped string. - - - - &reftitle.seealso; - - mysqli_character_set_name. - - - - &reftitle.examples; - - Object oriented style - + + + + 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 + + + + Description + Procedural style: + + stringmysqli_real_escape_string + mysqlilink + stringescapestr + + Object oriented style (method): + + mysqli + + stringreal_escape_string + stringescapestr + + + + 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. + + + + &reftitle.returnvalues; + + Returns an escaped string. + + + + &reftitle.seealso; + + mysqli_character_set_name. + + + + &reftitle.examples; + + Object oriented style + query("INSERT into myCity (Name) VALUES ('$city')")) { $mysqli->close(); ?> ]]> - - - - Procedural style - + + + + Procedural style + ]]> - - - &example.outputs; - + + + &example.outputs; + - - - + + + - - - mysqli_stmt_bind_param - stmt->bind_param - Binds variables to a prepared statement as parameters - - - Description - Procedural style: - - boolmysqli_stmt_bind_param - mysqli_stmtstmt - stringtypes - mixedvar1 - mixed... - - Object oriented style (method): - - mysqli_stmt - - boolbind_param - stringtypes - mixedvar1 - mixed... - - + + + + mysqli_stmt_bind_param + stmt->bind_param + Binds variables to a prepared statement as parameters + + + Description + Procedural style: + + boolmysqli_stmt_bind_param + mysqli_stmtstmt + stringtypes + mixedvar1 + mixed... + + Object oriented style (method): + + mysqli_stmt + + boolbind_param + stringtypes + mixedvar1 + mixed... + + + + mysqli_stmt_bind_param is used to bind variables for the + parameter markers in the SQL statement that was passed to + mysqli_prepare. + The string types contains one or more characters which specify + the types for the corresponding bind variables + + Type specification chars + + + + Character + Description + + + + + i + corresponding variable has type integer + + + d + corresponding variable has type double + + + s + corresponding variable has type string + + + b + corresponding variable is a blob and will be send in packages + + + +
+
+ - mysqli_stmt_bind_param is used to bind variables for the - parameter markers in the SQL statement that was passed to - mysqli_prepare. - The string types contains one or more characters which specify - the types for the corresponding bind variables - - Type specification chars - - - - Character - Description - - - - - i - corresponding variable has type integer - - - d - corresponding variable has type double - - - s - corresponding variable has type string - - - b - corresponding variable is a blob and will be send in packages - - - -
+ If data size of a variable exceeds max. allowed package size + (max_allowed_package), you have to specify b in + types and use + mysqli_stmt_send_long_data to send the data in packages.
- - - If data size of a variable exceeds max. allowed package size - (max_allowed_package), you have to specify b in - types and use - mysqli_stmt_send_long_data to send the data in packages. - - - The number of variables and length of - string types must match the parameters in the statement. - - -
- - &reftitle.returnvalues; - &return.success; - - - - &reftitle.seealso; - - mysqli_stmt_bind_result, - mysqli_stmt_execute, - mysqli_stmt_fetch, - mysqli_prepare, - mysqli_stmt_send_long_data, - mysqli_stmt_errno&listendand; - mysqli_stmt_error. - - - - &reftitle.examples; - - Object oriented style - + The number of variables and length of + string types must match the parameters in the statement. + + + + + &reftitle.returnvalues; + + &return.success; + + + + &reftitle.seealso; + + mysqli_stmt_bind_result, + mysqli_stmt_execute, + mysqli_stmt_fetch, + mysqli_prepare, + mysqli_stmt_send_long_data, + mysqli_stmt_errno&listendand; + mysqli_stmt_error. + + + + &reftitle.examples; + + Object oriented style + affected_rows); $mysqli->close(); ?> ]]> - - - - Procedural style - + + + + Procedural style + ]]> - - - &example.outputs; - + + + &example.outputs; + - - -
+ +
+
- - - mysqli_stmt_bind_result - stmt->bind_result - Binds variables to a prepared statement for result storage - - - Description - Procedural style: - - boolmysqli_stmt_bind_result - mysqli_stmtstmt - mixedvar1 - mixed... - - Object oriented style (method): - - mysqli_stmt - - boolbind_result - mixedvar1 - mixed... - - - - mysqli_stmt_bind_result is used to associate (bind) columns in the result - set to variables. When mysqli_stmt_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_stmt_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_stmt_fetch is called. - - - - - &reftitle.returnvalues; + + + + mysqli_stmt_bind_result + stmt->bind_result + Binds variables to a prepared statement for result storage + + + Description + Procedural style: + + boolmysqli_stmt_bind_result + mysqli_stmtstmt + mixedvar1 + mixed... + + Object oriented style (method): + + mysqli_stmt + + boolbind_result + mixedvar1 + mixed... + + + + mysqli_stmt_bind_result is used to associate (bind) columns in the result + set to variables. When mysqli_stmt_fetch is called to fetch data, the MySQL + client/server protocol places the data for the bound columns into the specified variables + var1, .... + + - &return.success; + Note that all columns must be bound prior to calling mysqli_stmt_fetch. + Depending on column types bound variables can silently change to the corresponding PHP type. - - - &reftitle.seealso; - mysqli_stmt_bind_param, - mysqli_stmt_execute, - mysqli_stmt_fetch, - mysqli_prepare, - mysqli_stmt_prepare, - mysqli_stmt_init, - mysqli_stmt_errno&listendand; - mysqli_stmt_error. + 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_stmt_fetch is called. - - - &reftitle.examples; - - Object oriented style - + + + + &reftitle.returnvalues; + + &return.success; + + + + &reftitle.seealso; + + mysqli_stmt_bind_param, + mysqli_stmt_execute, + mysqli_stmt_fetch, + mysqli_prepare, + mysqli_stmt_prepare, + mysqli_stmt_init, + mysqli_stmt_errno&listendand; + mysqli_stmt_error. + + + + &reftitle.examples; + + Object oriented style + close(); ?> ]]> - - - - Procedural style - + + + + Procedural style + ]]> - - - &example.outputs; - + + + &example.outputs; + - - - + + + - - - mysqli_stmt_execute - stmt->execute - Executes a prepared Query - - - Description - Procedural style: - - boolmysqli_stmt_execute - mysqli_stmtstmt - - Object oriented style (method): - - mysqli_stmt - - boolexecute - - - - - The mysqli_stmt_execute function executes a query that has been previously - prepared using the mysqli_prepare function represented by the - 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 - determined by using the mysqli_stmt_affected_rows function. Likewise, - if the query yields a result set the mysqli_stmt_fetch function is used. - - - - When using mysqli_stmt_execute, the mysqli_stmt_fetch - function must be used to fetch the data prior to performing any additional queries. - - - - - &reftitle.returnvalues; - - &return.success; - - - - &reftitle.seealso; - - mysqli_prepare&listendand; - mysqli_stmt_bind_param. - - - - &reftitle.examples; - - Object oriented style - + + + + mysqli_stmt_execute + stmt->execute + Executes a prepared Query + + + Description + Procedural style: + + boolmysqli_stmt_execute + mysqli_stmtstmt + + Object oriented style (method): + + mysqli_stmt + + boolexecute + + + + + The mysqli_stmt_execute function executes a query that has been previously + prepared using the mysqli_prepare function represented by the + 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 + determined by using the mysqli_stmt_affected_rows function. Likewise, + if the query yields a result set the mysqli_stmt_fetch function is used. + + + + When using mysqli_stmt_execute, the mysqli_stmt_fetch + function must be used to fetch the data prior to performing any additional queries. + + + + + &reftitle.returnvalues; + + &return.success; + + + + &reftitle.seealso; + + mysqli_prepare&listendand; + mysqli_stmt_bind_param. + + + + &reftitle.examples; + + Object oriented style + query("DROP TABLE myCity"); $mysqli->close(); ?> ]]> - - - - Procedural style - + + + + Procedural style + - - - + + + - - - mysqli_stmt_fetch - stmt->fetch - - Fetch results from a prepared statement into the bound variables - - - - Description - Procedural style: - - mixedmysqli_stmt_fetch - mysqli_stmtstmt - - Object oriented style (method): - - mysqli_stmt - - mixedfetch - - - - - mysqli_stmt_fetch fetch the result from a prepared - statement into the variables bound by - mysqli_stmt_bind_result. - - - - Note that all columns must be bound by the application before calling - mysqli_stmt_fetch. - - - - - &reftitle.returnvalues; - - &reftitle.returnvalues; - - - - Value - Description - - - - - &true; - Success. Data has been fetched - - - &false; - Error occured - - - &null; - No more rows/data exists - - - -
-
- - &reftitle.seealso; - - mysqli_prepare, - mysqli_stmt_errno, - mysqli_stmt_error&listendand; - mysqli_stmt_bind_result. - - - - &reftitle.examples; - - Object oriented style - + + + + mysqli_stmt_fetch + stmt->fetch + + Fetch results from a prepared statement into the bound variables + + + + Description + Procedural style: + + mixedmysqli_stmt_fetch + mysqli_stmtstmt + + Object oriented style (method): + + mysqli_stmt + + mixedfetch + + + + + mysqli_stmt_fetch fetch the result from a prepared + statement into the variables bound by + mysqli_stmt_bind_result. + + + + Note that all columns must be bound by the application before calling + mysqli_stmt_fetch. + + + + + &reftitle.returnvalues; + + &reftitle.returnvalues; + + + + Value + Description + + + + + &true; + Success. Data has been fetched + + + &false; + Error occured + + + &null; + No more rows/data exists + + + +
+
+ + &reftitle.seealso; + + mysqli_prepare, + mysqli_stmt_errno, + mysqli_stmt_error&listendand; + mysqli_stmt_bind_result. + + + + &reftitle.examples; + + Object oriented style + prepare($query)) { $mysqli->close(); ?> ]]> - - - - Procedural style - + + + + Procedural style + ]]> - - - &example.outputs; - +
+
+ &example.outputs; + - -
-
+ + + - - - mysqli_stmt_param_count - stmt->param_count - Returns the number of parameter for the given statement - - - Description - Procedural style: - - intmysqli_stmt_param_count - mysqli_stmtstmt - - Object oriented style (property): - - mysqli_stmt - intparam_count - - - mysqli_stmt_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. - - - - &reftitle.examples; - - Object oriented style - + + + + mysqli_stmt_param_count + stmt->param_count + Returns the number of parameter for the given statement + + + Description + Procedural style: + + intmysqli_stmt_param_count + mysqli_stmtstmt + + Object oriented style (property): + + mysqli_stmt + intparam_count + + + mysqli_stmt_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. + + + + &reftitle.examples; + + Object oriented style + prepare("SELECT Name FROM Country WHERE Name=? OR Code=?")) $mysqli->close(); ?> ]]> - - - - Procedural style - + + + + Procedural style + ]]> - - - &example.outputs; - + + + &example.outputs; + - - - + + + - - - mysqli_stmt_result_metadata - Returns result set metadata from a prepared statement - - - Description - Procedural style: - - mixedmysqli_stmt_result_metadata - mysqli_stmtstmt - - Object oriented style (method): - - mysqli_stmt - - mixedresult_metadata - - - - - If a statement passed to mysqli_prepare is one that produces - a result set, mysqli_stmt_result_metadata returns the result object - that can be used to process the meta information such as total number of fields - and individual field information. - - - This result set pointer can be passed as an argument to any of the - field-based functions that process result set metadata, such as: - - mysqli_num_fields - mysqli_fetch_field - mysqli_fetch_field_direct - mysqli_fetch_fields - mysqli_field_count - mysqli_field_seek - mysqli_field_tell - mysqli_free_result - - - - - The result set structure should be freed when you are done with it, - which you can do by passing it to mysqli_free_result - - - - The result set returned by mysqli_stmt_result_metadata contains only - metadata. It does not contain any row results. The rows are obtained by using the - statement handle with mysqli_stmt_fetch. - - - - - &reftitle.returnvalues; - - mysqli_stmt_result_metadata returns a result object or &false; if - an error occured. - - - - &reftitle.seealso; - - mysqli_prepare&listendand; - mysqli_free_result. - - - - &reftitle.examples; - - - Object oriented style - + + + + mysqli_stmt_result_metadata + Returns result set metadata from a prepared statement + + + Description + Procedural style: + + mixedmysqli_stmt_result_metadata + mysqli_stmtstmt + + Object oriented style (method): + + mysqli_stmt + + mixedresult_metadata + + + + + If a statement passed to mysqli_prepare is one that produces + a result set, mysqli_stmt_result_metadata returns the result object + that can be used to process the meta information such as total number of fields + and individual field information. + + + This result set pointer can be passed as an argument to any of the + field-based functions that process result set metadata, such as: + + mysqli_num_fields + mysqli_fetch_field + mysqli_fetch_field_direct + mysqli_fetch_fields + mysqli_field_count + mysqli_field_seek + mysqli_field_tell + mysqli_free_result + + + + + The result set structure should be freed when you are done with it, + which you can do by passing it to mysqli_free_result + + + + The result set returned by mysqli_stmt_result_metadata contains only + metadata. It does not contain any row results. The rows are obtained by using the + statement handle with mysqli_stmt_fetch. + + + + + &reftitle.returnvalues; + + mysqli_stmt_result_metadata returns a result object or &false; if + an error occured. + + + + &reftitle.seealso; + + mysqli_prepare&listendand; + mysqli_free_result. + + + + &reftitle.examples; + + + Object oriented style + close(); $mysqli->close(); ?> ]]> - - - - Procedural style - + + + + Procedural style + ]]> - - - - - + + + + + - - - mysqli_stmt_send_long_data - stmt->send_long_data - Send data in blocks - - - Description - Procedural style: - - boolmysqli_stmt_send_long_data - mysqli_stmtstmt - intparam_nr - stringdata - - Object oriented style (method) - - mysqli_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. - - - - &reftitle.returnvalues; - &return.success; - - - &reftitle.seealso; - - mysqli_prepare&listendand; - mysqli_stmt_bind_param. - - - + + + + mysqli_stmt_send_long_data + stmt->send_long_data + Send data in blocks + + + Description + Procedural style: + + boolmysqli_stmt_send_long_data + mysqli_stmtstmt + intparam_nr + stringdata + + Object oriented style (method) + + mysqli_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. + + + + &reftitle.returnvalues; + &return.success; + + + &reftitle.seealso; + + mysqli_prepare&listendand; + mysqli_stmt_bind_param. + + +