PhpRiot
Follow phpriot on Twitter
Sponsored Link
Download Article
Download this article in PDF format with all listings and files.

Price: $5.00 AUD
(Approx. $5.00 USD)

More information
Become Zend Certified

Prepare for the ZCE exam using our quizzes (web or iPad/iPhone). More info...


When you're ready get 7.5% off your exam voucher using voucher CJQNOV23 at the Zend Store
Free iPad/iPhone App
Available on the App Store

  • PHP manual
  • Zend Framework manual
  • Smarty manual
  • PHP articles
  • PHP training

Related Books
PHP 5 Advanced: Visual QuickPro Guide

PHP 5 Advanced: Visual QuickPro Guide

Sharpen your PHP skills with the fully revised and updated, PHP 5 Advanced for the World Wide...

SEO Warrior

SEO Warrior

How can you make it easier for people to find your website? And how can you convert casual...

Managing Your Data With DatabaseObject

Summary

In this example we looked at the DatabaseObject class by me, Quentin Zervaas.

It is a class that provides a high level interface to your database, making creation, updating and deletion of database records very simple.

Hopefully a few of the examples here have shown how much you can do with the class, and how it can help centralise your code for managing a database table into a single file.

This class is used extensively in the implementation of phpRiot. For instance, there is an ‘articles’ table which holds all the various articles in the site. There is a PHP class called ‘Article’ which is a sub-class of DatabaseObject, used to manage this table.

Other Options

In This Article


Additional Files