MySQL PHP Class Disconnecting

Disconnecting from a database is easy and necessary. See the function below.

disconnect function

This function is used to disconnect from your database.

function disconnect() {
	if(@mysql_close($this->c)) {
		return true;
	}
	return false;
}

Parameters

No parameters for this function.

Return Value

Returns TRUE upon successful disconnect and FALSE on failure.

Examples

This function is called when you create the MySQL class object like so:

$connection->disconnect();
Copyright © 2007 Ternstyle Inc., All rights reserved.
Site designed by, well, me.