PHP 8.1.0 Alpha 1 available for testing

The mysqli class

(PHP 5, PHP 7)

Introduction

Represents a connection between PHP and a MySQL database.

Class synopsis

mysqli {
/* Properties */
string|null $connect_error;
int $errno;
string $error;
string|null $client_info;
string $host_info;
string $server_info;
string|null $info;
int|string $insert_id;
string $sqlstate;
/* Methods */
public __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") )
public autocommit ( bool $enable ) : bool
public begin_transaction ( int $flags = 0 , string|null $name = null ) : bool
public change_user ( string $username , string $password , string|null $database ) : bool
public character_set_name ( ) : string
public close ( ) : bool
public commit ( int $flags = 0 , string|null $name = null ) : bool
public 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") ) : void
public debug ( string $options ) : bool
public dump_debug_info ( ) : bool
public get_charset ( ) : object|null
public get_client_info ( ) : string|null
public get_connection_stats ( ) : array
public get_server_info ( ) : string
public get_warnings ( ) : mysqli_warning|false
public init ( ) : mysqli
public kill ( int $process_id ) : bool
public more_results ( ) : bool
public multi_query ( string $query ) : bool
public next_result ( ) : bool
public options ( int $option , string|int $value ) : bool
public ping ( ) : bool
public static poll ( array|null &$read , array|null &$error , array &$reject , int $seconds , int $microseconds = 0 ) : int|false
public prepare ( string $query ) : mysqli_stmt|false
public query ( string $query , int $result_mode = MYSQLI_STORE_RESULT ) : mysqli_result|bool
public real_connect ( string $host = ? , string $username = ? , string $passwd = ? , string $dbname = ? , int $port = ? , string $socket = ? , int $flags = ? ) : bool
public real_escape_string ( string $string ) : string
public real_query ( string $query ) : bool
public reap_async_query ( ) : mysqli_result|bool
public refresh ( int $flags ) : bool
public release_savepoint ( string $name ) : bool
public rollback ( int $flags = 0 , string|null $name = null ) : bool
public savepoint ( string $name ) : bool
public select_db ( string $database ) : bool
public set_charset ( string $charset ) : bool
public ssl_set ( string|null $key , string|null $certificate , string|null $ca_certificate , string|null $ca_path , string|null $cipher_algos ) : bool
public stat ( ) : string|false
public stmt_init ( ) : mysqli_stmt|false
public store_result ( int $mode = 0 ) : mysqli_result|false
public thread_safe ( ) : bool
public use_result ( ) : mysqli_result|false
}

Table of Contents

add a note add a note

User Contributed Notes

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