Mysqli Php


PHPhường MySQLi Introduction

The MySQLi functions allows you to access MySquốc lộ database servers.

Bạn đang xem: Mysqli php

Note: The MySQLi extension is designed khổng lồ work with MySquốc lộ version 4.1.13 or newer.

Xem thêm: Phần Mềm Hrm Là Gì ? Khái Quát Về Human Resource Management

Installation / Runtime Configuration

For the MySQLi functions khổng lồ be available, you must compile PHP with support for the MySQLi extension.

The MySQLi extension was introduced with PHPhường version 5.0.0. The MySQL Native Driver was included in PHP version 5.3.0.

For installation details, go to: http://php.net/manual/en/mysqli.installation.php

For runtime configuration details, go to: http://php.net/manual/en/mysqli.configuration.php

PHPhường MySQLi Functions


Function Description affected_rows() Returns the number of affected rows in the previous MySQL operation autocommit() Turns on or off auto-committing database modifications begin_transaction() Starts a transaction change_user() Changes the user of the specified database connection character_set_name() Returns the default character set for the database connection close() Closes a previously opened database connection commit() Commits the current transaction connect() Opens a new connection khổng lồ the MySQL VPS connect_errno() Returns the error code from the last connection error connect_error() Returns the error description from the last connection error data_seek() Adjusts the result pointer khổng lồ an arbitrary row in the result-phối debug() Performs debugging operations dump_debug_info() Dumps debugging info inlớn the log errno() Returns the last error code for the most recent function Gọi error() Returns the last error mô tả tìm kiếm for the most recent function Hotline error_list() Returns a các mục of errors for the most recent function Call fetch_all() Fetches all result rows as an associative array, a numeric array, or both fetch_array() Fetches a result row as an associative, a numeric array, or both fetch_assoc() Fetches a result row as an associative sầu array fetch_field() Returns the next field in the result-set, as an object fetch_field_direct() Returns meta-data for a single field in the result-phối, as an object fetch_fields() Returns an array of objects that represent the fields in a result-mix fetch_lengths() Returns the lengths of the columns of the current row in the result-phối fetch_object() Returns the current row of a result-mix, as an object fetch_row() Fetches one row from a result-set và returns it as an enumerated array field_count() Returns the number of columns for the most recent query field_seek() Sets the field cursor to the given field offmix get_charset() Returns a character set object get_client_info() Returns the MySQL client library version get_client_stats() Returns statistics about client per-process get_client_version() Returns the MySquốc lộ client library version as an integer get_connection_stats() Returns statistics about the client connection get_host_info() Returns the MySQL VPS hostname và the connection type get_proto_info() Returns the MySQL protocol version get_server_info() Returns the MySquốc lộ server version get_server_version() Returns the MySquốc lộ server version as an integer info() Returns information about the last executed query init() Initializes MySQLi & returns a resource for use with real_connect() insert_id() Returns the auto-generated id from the last query kill() Asks the server lớn kill a MySQL thread more_results() Checks if there are more results from a multi query multi_query() Performs one or more queries on the database next_result() Prepares the next result-phối from multi_query() options() Sets extra connect options & affect behavior for a connection ping() Pings a server connection, or tries lớn reconnect if the connection has gone down poll() Polls connections prepare() Prepares an SQL statement for execution query() Performs a query against a database real_connect() Opens a new connection khổng lồ the MySquốc lộ server real_escape_string() Escapes special characters in a string for use in an SQL statement real_query() Executes a single Squốc lộ query reap_async_query() Returns result from an async Squốc lộ query refresh() Refreshes/flushes tables or caches, or resets the replication server information rollback() Rolls baông chồng the current transaction for the database select_db() Select the default database for database queries set_charset() Sets the mặc định client character phối set_local_infile_default() Unsets user defined handler for load local infile comm& set_local_infile_handler() Set callbaông chồng function for LOAD DATA LOCAL INFILE commvà sqlstate() Returns the SQLSTATE error code for the error ssl_set() Used to establish secure connections using SSL stat() Returns the current system status stmt_init() Initializes a statement và returns an object for use with stmt_prepare() store_result() Transfers a result-set from the last query thread_id() Returns the thread ID for the current connection thread_safe() Returns whether the client library is compiled as thread-safe use_result() Initiates the retrieval of a result-phối from the last query executed warning_count() Returns the number of warnings from the last query in the connection