PHP 7.4.24 Released!

La clase mysqli

(PHP 5, PHP 7, PHP 8)

Introducción

Representa una conexión entre PHP y una base de datos MySQL.

Sinopsis de la Clase

class mysqli {
/* Propiedades */
int $errno;
string $error;
string $host_info;
string $server_info;
string $info;
string $sqlstate;
/* Métodos */
__construct(
    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")
)
autocommit(bool $mode): bool
change_user(string $user, string $password, string $database): bool
close(): bool
commit(int $flags = ?, string $name = ?): bool
debug(string $message): bool
get_charset(): object
get_client_info(): string
mysqli_stmt::get_server_info(): string
kill(int $processid): bool
more_results(): bool
multi_query(string $query): bool
next_result(): bool
options(int $option, mixed $value): bool
ping(): bool
public static poll(
    array &$read,
    array &$error,
    array &$reject,
    int $sec,
    int $usec = ?
): int
prepare(string $query): mysqli_stmt
query(string $query, int $resultmode = MYSQLI_STORE_RESULT): mixed
real_connect(
    string $host = ?,
    string $username = ?,
    string $passwd = ?,
    string $dbname = ?,
    int $port = ?,
    string $socket = ?,
    int $flags = ?
): bool
escape_string(string $escapestr): string
real_query(string $query): bool
public refresh(int $options): bool
rollback(int $flags = ?, string $name = ?): bool
select_db(string $dbname): bool
set_charset(string $charset): bool
ssl_set(
    string $key,
    string $cert,
    string $ca,
    string $capath,
    string $cipher
): bool
stat(): string
store_result(int $option = ?): mysqli_result
}

Tabla de contenidos

add a note add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top