mysqli::close

(PHP 5, PHP 7)
Closes a previously opened database connection
bool mysqli::close ( void )

Object oriented style

Procedural style

bool mysqli_close ( mysqli $link )

Closes a previously opened database connection.

Open non-persistent MySQL connections and result sets are automatically destroyed when a PHP script finishes its execution. So, while explicitly closing open connections and freeing result sets is optional, doing so is recommended. This will immediately return resources to PHP and MySQL, which can improve performance. For related information, see freeing resources

Parameters:
link

Procedural style only: A link identifier returned by mysqli_connect() or mysqli_init()

Returns:

Returns TRUE on success or FALSE on failure.

Notes:

mysqli_close() will not close persistent connections. For additional details, see the manual page on persistent connections.

See also:

mysqli::__construct() -

mysqli_init() -

mysqli_real_connect() -

mysqli_free_result() -

doc_php
2016-02-24 16:18:58
Comments
Leave a Comment

Please login to continue.