Hello all. The following code connects my database
var $connection;
function MySQLDB(){
$this->connection = mysql_connect(DB_SERVER, DB_USER, DB_PASS) or die(mysql_error());
mysql_select_db(DB_NAME, $this->connection) or die(mysql_error());
etc etc
This code is within a class called MySQLDB
At the end
$database = new MySQLDB;
Inside that class I can connect to things using
$this->connection
How can I access this connection from outside the class within another class? Thanks