Which PHP function is used to disconnect from MySQL database?

WBOY
Release: 2023-09-05 13:24:01
forward
952 people have browsed it

Which PHP function is used to disconnect from MySQL database?

PHP provides us with the mysql_close() function, with which we can disconnect from the MySQL database at any time. This function takes a single parameter, which is the connection returned by the mysql_connect() function. The syntax is as follows -

Syntax

bool mysql_close ( resource $link_identifier );
Copy after login

Here, if no resource is specified, the last opened database will be closed. This function returns true if the connection is closed successfully, false otherwise.

The above is the detailed content of Which PHP function is used to disconnect from MySQL database?. For more information, please follow other related articles on the PHP Chinese website!

source:tutorialspoint.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!