PHP/MySQL Database/mysql close
Версия от 10:37, 26 мая 2010; (обсуждение)
Disconnecting from a MySQL Database
mysql_connect("localhost", "phpuser", "password");
mysql_select_db("phpdb");
mysql_close( );
function mysql_close() closes the connection.
If the link_id is not specified, mysql_close() will close the most recently opened link.
The syntax is: int mysql_close ([int link_id])
<?
@mysql_connect("localhost", "web", "asdf") or die("Could not connect to MySQL server!");
@mysql_select_db("company") or die("Could not select company database!");
print "You"re connected to a MySQL database!";
mysql_close();
?>