![]() |
Singleton Help
Hello,
Salathe was helping me a bit with this script I'm coding, and I figured it would be best if I just used a database class for this script, as it might be helpful to us in the future. The problem is, when I use $db->query('query'); it says that query() is an undefined method, when it clearly is. Now, I'm not even sure if the way I'm going about using the class is the best way, so if someone could make some suggestions, that would be helpful. Database.class.php PHP Code:
PHP Code:
PHP Code:
Code:
Fatal error: Call to undefined method Database::query() in C:\xampp\htdocs\PHP\VW\includes\categories.class.php on line 10Thanks, Andrew |
Fixed. Without my knowing, database.class.php was being saved to the directory where I had all my old include files. So once I put the query() method in the new files, it worked.
|
It's a good class, especially the database class handler. You can expand all the functions using a history (to give a list of ALL made queries and where it went wrong (debugging)) and maybe a public $time; in the top, using it in queries like so:
PHP Code:
|
| All times are GMT. The time now is 08:13 AM. |
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0