哈希空间 Ctrl + F 进行搜索
首页 php手册中文版 CSS中文手册 哈希文档 Markdown在线工具

PHP mysqli 组件

MySQLi类

(PHP 5, PHP 7, PHP 8)

简介

代表PHP和Mysql数据库之间的一个连接。

类摘要

class mysqli {
/* 属性 */
int|string $affected_rows;
?string $connect_error;
int $errno;
array $error_list;
string $error;
string $client_info;
string $host_info;
string $server_info;
string $info;
string $sqlstate;
/* 方法 */
mysqli_affected_rows(mysqli $mysql): int|string
autocommit(bool $mode): bool
public begin_transaction(int $flags = 0, ?string $name = null): bool
public change_user(string $username, string $password, ?string $database): bool
character_set_name(): string
close(): bool
commit(): bool
mysqli_connect_errno(): int
mysqli_connect_error(): ?string
public connect(
    string $hostname = ini_get("mysqli.default_host"),
    string $username = ini_get("mysqli.default_user"),
    string $password = ini_get("mysqli.default_pw"),
    string $database = "",
    int $port = ini_get("mysqli.default_port"),
    string $socket = ini_get("mysqli.default_socket")
): void
public debug(string $options): bool
dump_debug_info(): bool
mysqli_errno(mysqli $link): int
mysqli_error_list(mysqli $mysql): array
mysqli_error(mysqli $mysql): string
public execute_query(string $query, ?array $params = null): mysqli_result|bool
mysqli_field_count(mysqli $mysql): int
public get_charset(): ?object
get_client_info(): string
mysqli_get_client_version(mysqli $link): int
mysqli_get_host_info(mysqli $link): string
mysqli_get_proto_info(mysqli $link): int
mysqli_get_server_info(mysqli $link): string
mysqli_get_server_version(mysqli $link): int
public get_warnings(): mysqli_warning|false
mysqli_info(mysqli $link): string
mysqli_insert_id(mysqli $link): mixed
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 = 0
): 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
public release_savepoint(string $name): bool
rollback(): bool
public savepoint(string $name): bool
select_db(string $dbname): bool
set_charset(string $charset): bool
mysqli_sqlstate(mysqli $link): string
ssl_set(
    string $key,
    string $cert,
    string $ca,
    string $capath,
    string $cipher
): bool
stat(): string
store_result(int $option = ?): mysqli_result
mysqli_thread_id(mysqli $link): int
mysqli_thread_safe(): bool
public use_result(): mysqli_result|false
mysqli_warning_count(mysqli $mysql): int
}

目录

打开 哈希空间 微信小程序中查看更佳