MySQLi类
(PHP 5, PHP 7, PHP 8)
简介
代表PHP和Mysql数据库之间的一个连接。
类摘要
class mysqli
{
int $errno;
mysqli_affected_rows(
mysqli $mysql
):
int|string
public change_user(
string $username
,
string $password
,
?string $database
):
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
mysqli_errno(
mysqli $link
):
int
mysqli_error_list(
mysqli $mysql
):
array
mysqli_error(
mysqli $mysql
):
string
mysqli_field_count(
mysqli $mysql
):
int
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
mysqli_info(
mysqli $link
):
string
kill(
int $processid
):
bool
public static poll(
array &$read
,
array &$error
,
array &$reject
,
int $sec
,
int $usec
= 0):
int
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
mysqli_sqlstate(
mysqli $link
):
string
ssl_set(
string $key
,
string $cert
,
string $ca
,
string $capath
,
string $cipher
):
bool
mysqli_thread_id(
mysqli $link
):
int
mysqli_thread_safe(): bool
mysqli_warning_count(
mysqli $mysql
):
int
}
目录
There are no user contributed notes for this page.
官方地址:https://www.php.net/manual/en/class.mysqli.php