Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Gettin' Lazy on the Job:
PHP and Databases
Oct 23, 2002 @ 13:00:15

Ever noticed that you either end up using the same exact database code on more than one project? Or possibly that you've been using an abstraction layer for so long, you know it by it's first name? Well, an article from the Database Journal just might hold the answer for you.

In PHP and Working with Databases (for the Lazy Sod) - Database Abstraction and Atomic Operations and Classes Explored (longest name *ever*) they talk about using your database resources to the best of their abilities and making use of a class that is quite good at what it does - making it able for you to be as lazy as you can when working with a database.

Basically, it's built so that, using normal ANSI SQL, you can trade out the actual send/fetch functions of the class with whatever database you need to use and the rest of the class will work exactly the same as it did before. Ideally, the experience would be completely seamless whether you're using a Oracle database or MySQL. (OOP is so very cool...)

tagged:

Link:


Trending Topics: