Using a Resource as a Class Property



I'm wondering if I'm doing this right, as far as using another class object as a PHP class property.

class my_baseclass {
var $Database;
var $ErrorMessage;
var $TableName;
var $RecordSet;
function my_baseclass(){
$this->TableName = "";
$this->RecordSet = array();
$this->Database = new my_database();
$this->ErrorMessage = $this->Database->ErrorMessage;
return true;
}
}

It seems to be working, but this kinds stuff skirts the edge of my PHP grok, so I dunno.
.



Relevant Pages

  • Re: Using a Resource as a Class Property
    ... object as a PHP class property. ... var $ErrorMessage; ... It seems to be working, but this kinds stuff skirts the edge of my PHP grok, so I dunno. ... to PHP 5 and make use of its OOP features. ...
    (comp.lang.php)
  • Re: Using a Resource as a Class Property
    ... object as a PHP class property. ... var $ErrorMessage; ... but this kinds stuff skirts the edge of my PHP ... to PHP 5 and make use of its OOP features. ...
    (comp.lang.php)
  • Re: problems with mysql_fetch_array($IsResult,MYSQL_NUM)
    ... I am trying to write a simple database class to encapsulate all the ... executes the loop. ... $IsResult is reeves no value. ... var $mResult; ...
    (comp.lang.php)
  • Re: Help with two page form
    ... database entry for this order with the Pickup Location, ... <HEAD> ... function load1() { ... var load1 = window.open('http://www.webdesignsbyjc.com/DBSample/ ...
    (comp.lang.php)
  • Re: PHP page get executed twice
    ... $RESULTcheck = mssql_query; ... let's write data to database ... var $name; # columnname ... # class sql ...
    (comp.lang.php)