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

O'Reilly:
Simplify with PHP DataObjects
Aug 06, 2004 @ 12:02:48

Ever looked at your code and wondered if there was an easier way to perform the basic SQL tasks (insert, update, delete, select) without having to rewrite the SQL each time? Well, this new article from the O'Reilly Network aims to help you with just that.

Working with a database is an everyday exercise for web developers these days. From simple form processing to large-scale web applications, we almost always need a database. After working on a few projects, it doesn't take very long to realize that the same four simple database tasks repeat many times in virtually all projects.

You find yourself re-typing or copying and pasting your queries throughout your code, slightly modifying them as necessary in various places. [...] You can implement data access layers in more than one way, but here, we're interested in DataObjects.

A Data Access Object is a class that represents a table in your database structure. Then, with the help of four functions and a few global variables, you can quickly and simply access the data behind the scences...

tagged:

Link:


Trending Topics: