RE: [PHP] PHP - class question

2002-08-14 Thread Steve Bradwell
I would suggest you write a method (called mydb() for example) that connects to your database, and if needed, call it from your constructor like: $this-mydb(); This way you can always reuse the method from other code. hth, Steve. -Original Message- From: Mark Armendariz [mailto:[EMAIL

Re: [PHP] PHP - class question

2002-08-14 Thread Nick Oostveen
If you are just trying to access a classes functions without creating an instance of it you're probably looking to use the scope resolution operator ::. For this to work all you have to do is ensure that the definition for the class you wish to use is included into the file containing the

Re: [PHP] PHP - class question

2002-08-14 Thread Mark Armendariz
Well, I actually have a full db class which has a connect and close method as well as query, fetch_array, etc... What I really want to know is how to use the methods in my db class from another class (myclass for example).. Do I include the db class from the myclass constructor and then set a

Re: [PHP] PHP - class question

2002-08-14 Thread Mark Armendariz
Do you know where I can find more info on how to use the scope resolution operator? My searches aren't giving much (at leant not mcuh regarding php) and in the manual, it only shows up momentarily as a note in the operators section... Mark Nick Oostveen [EMAIL PROTECTED] wrote in message