Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access Superclass properties???

Status
Not open for further replies.

webamoeba

Programmer
Sep 6, 2006
23
GB
Hi,

I have a class called 'Record' and within which there is a property called '_database' which holds an instance of the class 'Database'.

Record is then extended by another class called 'UnitGroup', within 'UnitGroup' I want to be able to access {_database}->sql.

From 'Record' I can do this with the following:

$this->{_database}->sql("some sql here...");

but doing the same from 'UnitGroup' results in the error message:

Can't call method "sql" on an undefined value at...

er.... what am I doing wrong???

Thanks.
 
I take it all back!!

I fudged up my constructor whoopsie
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top