Location: PHPKode > scripts > Photos > photos/objects/class.database_connection.inc.php
<?php

// This file is part of Photos
// Copyright (c) 2001-2004 Alex King
// see LICENSE.txt for more information

class database_connection {
	var $connection;
	var $database_name;
	var $password;
	var $server;
	var $table_name;
	var $username;

	function connect() {
		$this->connection = mysql_connect($this->server, $this->username, $this->password)
			or die("Could not connect to server ".$this->server." as ".$this->username.".");
		mysql_select_db($this->database_name,$this->connection)
			or die("Could not select database. Reason: ".mysql_error());
	}
	function disconnect() {
		mysql_close($this->connection);
	}
}

?>
Return current item: Photos