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

Zend:
PHP OOP and Databases
Aug 20, 2003 @ 12:35:39

Zend has a new tutorial posted this morning about building database interfaces for your scripts into a single class.

The idea here isn't anything new to old hands with PHP OOP functionality, but it's a great place for people new to the concept to start. They show you how to create a class that will make updating and recalling information from it a snap, and make your headaches less and less as times goes on. They use a lot of global class variables to store the information you need to insert/delete/remove from your database. Of course, the data represented here is just for show (you'd have to adjust it for your system), but it gives you a good idea of what you'll need to do.

The class presented here is an interesting way to go about connectivity in a PHP application. Personally, I usually just have the connect/send/fetch in a class and then build the application on top of that. But, to each his own...

tagged:

Link:


Trending Topics: