Jump to content

Quick OOP Question


Demonic

Recommended Posts

Alright say you have 2 classes, one is a sql class and another is a authentication class.  The db class uses class methods to store data, if I extend the sql class in the authentication class, will I be able to use the parent classes methods?

 

In the sql class there is:

public function query($query) {
	$this->query = mysql_query( $query ) or trigger_error("There was a mysql error:" . mysql_error(), E_USER_ERROR);
}

 

query stores the sql resource so when i extend the sql class will the current child class have a newly create query method for use?

 

Want to make sure that's correct or not.

Link to comment
https://forums.phpfreaks.com/topic/113854-quick-oop-question/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.