Location: PHPKode > projects > Mivec Framework > mivec/demo/managers/DbConnectionManager.class.php
<?php

require_once "demo/GlobalConfig.inc.php";

class DbConnectionManager
{
	function openDbConnection()
	{
		$connection = mysql_connect(DBHOST, DBUSER, DBPASS);
		if(!$connection)
			die("Cannot open connection to database.\n" . mysql_error($connection));
		mysql_select_db(DBNAME, $connection);
		return $connection;
	}
	
	function closeDbConnection($connection)
	{
		mysql_close($connection);
	}
}

?>
Return current item: Mivec Framework