Am I missing something about classes?
I want to totally seperate my project into modules, for which a set of standard classes apply for general routines.
NOTE:each class also has its own include..
database class contains:
custom database function: DBQuery($sql)
error class contains:
function for database errors: errorDB($diedata)
within DBQuery I perform the execution of $sql and return the result set to the user, and if a bad query (or connection) call errorDB and pass the appropriate data for errorDB to deal with.
now do I:
1. define a new class 'error', and define a new class 'database' and pass each classes object via the function call (poor modular approach.)
2. define a new class 'database' and within the function errorDB define a new class error to be called? (I want some functions such as errorDB within lots of functions, executing an include for the error class on each query will create a large load overhead).
3. a method I have not found yet, and would love to know.. any ideas?
cheers in advance.