Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

mysqli_init(3) [php man page]

MYSQLI_INIT(3)								 1							    MYSQLI_INIT(3)

mysqli::init - Initializes MySQLi and returns a resource for use with mysqli_real_connect()

       Object oriented style

SYNOPSIS
mysqli mysqli::init (void ) DESCRIPTION
Procedural style mysqli mysqli_init (void ) Allocates or initializes a MYSQL object suitable for mysqli_options(3) and mysqli_real_connect(3). Note Any subsequent calls to any mysqli function (except mysqli_options(3)) will fail until mysqli_real_connect(3) was called. RETURN VALUES
Returns an object. EXAMPLES
See mysqli_real_connect(3). SEE ALSO
mysqli_options(3), mysqli_close(3), mysqli_real_connect(3), mysqli_connect(3). PHP Documentation Group MYSQLI_INIT(3)

Check Out this Related Man Page

MYSQLI_OPTIONS(3)							 1							 MYSQLI_OPTIONS(3)

mysqli::options - Set options

       Object oriented style

SYNOPSIS
bool mysqli::options (int $option, mixed $value) DESCRIPTION
Procedural style bool mysqli_options (mysqli $link, int $option, mixed $value) Used to set extra connect options and affect behavior for a connection. This function may be called multiple times to set several options. mysqli_options(3) should be called after mysqli_init(3) and before mysqli_real_connect(3). PARAMETERS
o $ link -Procedural style only: A link identifier returned by mysqli_connect(3) or mysqli_init(3) o $option - The option that you want to set. It can be one of the following values: Valid options +---------------------------+---------------------------------------------------+ | Name | | | | | | | Description | | | | +---------------------------+---------------------------------------------------+ | | | |MYSQLI_OPT_CONNECT_TIMEOUT | | | | | | | connection timeout in seconds (supported on Win- | | | dows with TCP/IP since PHP 5.3.1) | | | | | | | | MYSQLI_OPT_LOCAL_INFILE | | | | | | | enable/disable use of LOAD LOCAL INFILE | | | | | | | | MYSQLI_INIT_COMMAND | | | | | | | command to execute after when connecting to MySQL | | | server | | | | | | | | MYSQLI_READ_DEFAULT_FILE | | | | | | | Read options from named option file instead of | | | my.cnf | | | | | | | |MYSQLI_READ_DEFAULT_GROUP | | | | | | | Read options from the named group from my.cnf or | | | the file specified with MYSQL_READ_DEFAULT_FILE. | | | | | | | | MYSQLI_SERVER_PUBLIC_KEY | | | | | | | RSA public key file used with the SHA-256 based | | | authentication. | | | | +---------------------------+---------------------------------------------------+ o $value - The value for the option. RETURN VALUES
Returns TRUE on success or FALSE on failure. CHANGELOG
+--------+-------------------------------------------------+ |Version | | | | | | | Description | | | | +--------+-------------------------------------------------+ | 5.5.0 | | | | | | | The MYSQLI_SERVER_PUBLIC_KEY option was added. | | | | +--------+-------------------------------------------------+ EXAMPLES
See mysqli_real_connect(3). NOTES
Note MySQLnd always assumes the server default charset. This charset is sent during connection hand-shake/authentication, which mysqlnd will use. Libmysqlclient uses the default charset set in the my.cnf or by an explicit call to mysqli_options(3) prior to calling mysqli_real_connect(3), but after mysqli_init(3). SEE ALSO
mysqli_init(3), mysqli_real_connect(3). PHP Documentation Group MYSQLI_OPTIONS(3)
Man Page