+2  A: 

I think you may be approaching this wrong. That's certainly not the best way to go about it. Try breaking the many functions into smaller utility classes and then using those to composite a larger class.

Kalium
You're talking multiple inheritance, right? Or do I not comprehend your answer fully?
dare2be
not inheritance, just composition
Matt Ellen
You don't have to use multiple inheritance, although it's an option if your language boasts such a feature. I was thinking more of having multiple members which could interact as needed.Alternately, separate the groups of functionality into distinct layers and build a class hierarchy where each new class adds a layer atop the previous.
Kalium
Ok, the layer idea is *dirty*. The other option (if I understand it correctly) would involve a (singleton preferably) class `SQL` which would have members `SESSION`, `USER`, ... which would be instances of appropriate classes. However, that somehow misses the point, since the top-level class could not be declared as abstract, would have to be instantiated every time I would call a function. Code readability would drop dramatically.
dare2be
I can't edit my previous comment anymore, so I'll write here. Thank you for your idea, I'll post a follow-up to my question, involving your idea.
dare2be
A: 
Sjoerd
Won't agree with you on static methods. I've participated in many discussions about it and am holding my stand. Sorry.
dare2be
Good for you. You are free to disagree with me, but that does not mean that my answer is wrong or does not contribute anything. I respect that you do not want to enter a new discussion, but at least cite some source or state a reason so that I can learn something from it.
Sjoerd
I didn't mean to be harsh. Sorry. However, I downvoted since it DOES NOT contribute to my question. I decided on static methods and was seeking for solution that involved those. Let's not start a flame war :)
dare2be
+2  A: 

I think you should use the Builder pattern for your SQL instead of a motley container of static methods.

No, there is no multiple inheritance in PHP. Use delegation instead.

No, you can't include files to define methods of a class. You can only include files in contexts where code is executing, not in the middle of a class definition:

<?php

include("define-functions.php"); // OK

class Foo
{
  include("define-methods.php");  // ERROR

  function foo()
  {
    include("method-body.php"); // OK
  }
}

PHP Parse error:  syntax error, unexpected T_INCLUDE, expecting T_FUNCTION 
in foo.php on line 7

Re your comment:

Since you're committed to using only static methods, why bother with a class at all? Just define functions in the global scope. Then you can include() as many as you want:

<?php

include("SQLSession.php");
include("SQLUser.php");
include("SQLblahblah.php");

SQLSession.php:

<?php

function SQLSessionStart()
{
   ...
}

function SQLSessionEnd()
{
   ...
}

You don't have access to static class member data with this solution, but you can just use global variables.

Bill Karwin
Been there, done that. Thanks for the tip about the Builder pattern, but that's not the direction I want to take my code to...
dare2be
Thanks for further participating. I insisted on using a class because the whole code is OOP and `SQL::registerSession()` is much cleaner than `SQLRegisterSession()` but if all else fails, I'll go with your approach.
dare2be
A: 

to me, it sounds like you're trying to create a monolithic chunk of code, which is the exact opposite of class based OO code - I'd recommend following the DAO blueprint of the Java core patterns, and implementing it in PHP for what you want to do :) that should cover all you're questions

nathan
Well, what I actually want to do is write as little code as possible. And yes, that would involve creating a 'monolithic' chunk of code. And that's why I wanted it to be spread across multiple files. Monolithic = fewer lines of code. Splitting it across many files = easier maintainability. I just wanted to combine those two approaches :) Oh, and thanks a lot for the link. That'll give me something to think about.
dare2be