A classe MySQLi
Introdução
Representa uma conexão entre o PHP e um banco de dados MySQL.
Sinopse da classe
MySQLi
{
/* Propriedades */
int $affected_rows;
string $mysqli->client_info;
int $errno;
array $mysqli->error_list;
string $error;
string $host_info;
string $protocol_version;
string $server_info;
int $server_version;
string $info;
int $insert_id;
string $mysqli->sqlstate;
int $mysqli->thread_id;
/* Métodos */
mysqli mysqli_connect
([ string
$host = ini_get("mysqli.default_host")
[, string $username = ini_get("mysqli.default_user")
[, string $passwd = ini_get("mysqli.default_pw")
[, string $dbname = ""
[, int $port = ini_get("mysqli.default_port")
[, string $socket = ini_get("mysqli.default_socket")
]]]]]] )
array mysqli_get_client_stats
( void
)
mysqli mysqli_init
( void
)
public static int mysqli::poll
( array
&$read
, array &$error
, array &$reject
, int $sec
[, int $usec
] )
bool mysqli::real_connect
([ string
$host
[, string $username
[, string $passwd
[, string $dbname
[, int $port
[, string $socket
[, int $flags
]]]]]]] )
bool mysqli_thread_safe
( void
)
}Table of Contents
- mysqli->affected_rows — Retorna o número de linhas afetadas pela operação MySQL anterior
- mysqli::autocommit — Ativa ou desativa o salvar automaticamente as modificações no banco de dados
- mysqli::begin_transaction — Starts a transaction
- mysqli::change_user — Modifica o usuário para a conexão com o banco de dados especificada
- mysqli::character_set_name — Retorna o conjunto de caracteres padrão para a conexão com o banco de dados
- mysqli::$client_info — Get MySQL client info
- mysqli::$client_version — Returns the MySQL client version as a string
- mysqli_close — Fecha uma conexão aberta anteriormente com o banco de dados
- mysqli::commit — Salva a transação atual
- mysqli_connect_errno — Retorna o código de erro da ultima chamada a função connect
- mysqli_connect_error — Retorna uma string descrevendo o ultimo erro da função connect
- mysqli::__construct — Open a new connection to the MySQL server
- mysqli_debug — Realiza operações de debug
- mysqli::dump_debug_info — Descarrega informação de debug no log
- mysqli->errno — Retorna o código de erro para a chamada de função mais recente
- mysqli::$error_list — Returns a list of errors from the last command executed
- mysqli->error — Retorna uma string descrevendo o ultimo erro
- mysqli_field_count — Retorna o número de colunas para a consulta mais recente
- mysqli::get_charset — Returns a character set object
- mysqli::get_client_info — Retorna a versão do cliente MySQL como uma string
- mysqli_get_client_stats — Returns client per-process statistics
- mysqli::get_client_version — Obtém informação sobre o cliente MySQL
- mysqli::get_connection_stats — Returns statistics about the client connection
- mysqli_get_host_info — Retorna uma string representando o tipo da conexão usada
- mysqli->protocol_version — Retorna a versão do protocolo MySQL usada
- mysqli->server_info — Retorna a versão do servidor MySQL
- mysqli->server_version — Retorna a versão do servidor MySQL como um integer
- mysqli::get_warnings — Get result of SHOW WARNINGS
- mysqli_info — Recupera informação sobre a mais recente query executada
- mysqli_init — Inicializa a MySQLi e retorna um resource para usar com mysqli_real_connect()
- mysqli_insert_id — Retorna o id gerado automaticamente na última consulta
- mysqli::kill — Solicita ao servidor o encerramento de um thread do MySQL
- mysqli::more_results — Verifica se há mais algum resultado de uma multi query
- mysqli::multi_query — Performs a query on the database
- mysqli::next_result — Prepara o próximo resultado de multi_query
- mysqli::options — Set options
- mysqli::ping — Pings a server connection, or tries to reconnect if the connection has gone down
- mysqli::poll — Poll connections
- mysqli::prepare — Prepare an SQL statement for execution
- mysqli::query — Performs a query on the database
- mysqli::real_connect — Opens a connection to a mysql server
- mysqli::real_escape_string — Escapes special characters in a string for use in an SQL statement, taking into account the current charset of the connection
- mysqli::real_query — Execute an SQL query
- mysqli::reap_async_query — Get result from async query
- mysqli::refresh — Refreshes
- mysqli::release_savepoint — Removes the named savepoint from the set of savepoints of the current transaction
- mysqli::rollback — Rolls back current transaction
- mysqli::rpl_query_type — Returns RPL query type
- mysqli::savepoint — Set a named transaction savepoint
- mysqli::select_db — Selects the default database for database queries
- mysqli::send_query — Send the query and return
- mysqli::set_charset — Sets the default client character set
- mysqli::set_local_infile_default — Unsets user defined handler for load local infile command
- mysqli::set_local_infile_handler — Set callback function for LOAD DATA LOCAL INFILE command
- mysqli::$sqlstate — Returns the SQLSTATE error from previous MySQL operation
- mysqli::ssl_set — Used for establishing secure connections using SSL
- mysqli::stat — Gets the current system status
- mysqli::stmt_init — Initializes a statement and returns an object for use with mysqli_stmt_prepare
- mysqli::store_result — Transfers a result set from the last query
- mysqli::$thread_id — Returns the thread ID for the current connection
- mysqli::thread_safe — Returns whether thread safety is given or not
- mysqli::use_result — Initiate a result set retrieval
- mysqli::$warning_count — Returns the number of warnings from the last query for the given link