NYCPHP Meetup

NYPHP.org

[nycphp-talk] databases, classes, and you

Christopher Hendry chendry at gmail.com
Wed Oct 6 15:41:11 EDT 2004


> 
> When working with an existing database class, it is common to create a
> separate class for all SQL (commonly called the SQL class or DML
> class).  It is possible to just extend your database class and add all
> the SQL/DML methods there, as opposed to creating a completely
> separate class that defines all of your database calls.
> 

This is typically the approach I take - I have a base class that I use
a lot - written during the Amsterdam conference ;)

And I extened for more complex queries - I assumed it was out of my
own lazines because I never coded my base class to be fancy enough to
handle complex queries, but from what I'm seeing recently (and was the
case with the original app) - I found that the more specific the base
class is, the less useful it is because it can never properly handle
nuances.

C



More information about the talk mailing list