View Single Post
Old 01-28-2012, 08:45 AM   #2 (permalink)
core1024
The Wanderer
 
Join Date: May 2010
Posts: 19
Thanks: 1
core1024 is on a distinguished road
Default

Of cource you can. This error is not related with accessing globals. Somwhere in your code you're calling method of non-object variable. The easiest way would be to extend/edit your constructor method. This way you'll be sure that '$this' is instance of your class and you can call $this->query() without errors.
core1024 is offline  
Reply With Quote