Return to Snippet

Revision: 11015
at January 21, 2009 06:27 by jonniespratley


Updated Code
<?php

/** *******************************************************************
 * MySnippets
 * Free for use
 *
 * @author  Jonnie Spratley
 * @contact [email protected]
 ******************************************************************* */
class Database
{
	//Enter your credentials
	public $db_host = "HOST";
	public $db_name = "DATABASE";
	public $db_user = "USER";
	public $db_pass = "PASSWORD";
	public $dbconn;

	/**
	 * Enter description here...
	 *
	 * @return Database
	 */
	public function Database()
	{
		$this->dbconn = mysql_connect( $this->db_host, $this->db_user, $this->db_pass );
		
		mysql_select_db( $this->db_name, $this->dbconn );
	}
}
?>

Revision: 11014
at January 21, 2009 06:26 by jonniespratley


Initial Code

                                

Initial URL

                                

Initial Description

                                

Initial Title
Database Connection Class

Initial Tags
mysql, sql, php, textmate

Initial Language
Other