PHP mysqli_options() Function
Example
Open a new connection to the MySQL server:
Definition and Usage
The mysqli_options() function sets extra connection options that affect connection behavior.
The mysqli_options() function can be called multiple times to set several options.
**Note:** The mysqli_options() function can be called after mysqli_init() and before mysqli_real_connect() .
Syntax
mysqli_options(
connection,option,value
)
;
| Parameters | Description |
|---|---|
| connection | Required. Specifies the MySQL connection to use. |
| option | Required. Specifies the option to set. Can be one of the following values:
|
Technical Details
| Return Value: | Returns TRUE on success, FALSE on failure. |
|---|---|
| PHP Version: | 5+ |
| Changelog: | The MYSQLI_SERVER_PUBLIC_KEY option was added in PHP 5.5. |
PHP MySQLi Reference Manual