News Feed
Jobs Feed
Sections




News Archive
DevShed:
Running Conditional Select Statements with the Active Record Pattern
March 18, 2009 @ 07:58:54

DevShed continues their look at the Active Record pattern with this third part of the series focusing on a new method in their class that will make select requests for the Active Record layer.

If you're a PHP programmer who wants to learn how to implement the active record pattern within a MySQL abstraction class to make your database-driven applications more robust and maintainable, then look no further. [...] In this third chapter of the series I'm going to show you how to add a new method to the class. It will be charged with executing conditional SELECT statements via a modified version of the active record pattern.

After reviewing the CRUD functionality from the previous articles, they add in the new method - a fetchWhere function that allows the user to submit a table name and the parameters to add to the where clause as an array. Some sample code is included.

0 comments voice your opinion now!
activerecord designpattern pattern mysql layer abstraction fetchwhere


blog comments powered by Disqus

Similar Posts

Adobe Developer Source: Using PHP and Flex to Browse a MySQL Database

Vexxhost.com: Top 5 new (and cool!) features in PHP5 that you probably haven't heard of

DevShed: Using the Memento Pattern with a File Reading Class

Alexander Netkachev's Blog: Jamp! Easy Java/Apache/PHP/MySQL install in one click

Edin.dk: PHP 4.4 for windows with newer MySQL libraries


Community Events











Don't see your event here?
Let us know!


community opinion series symfony2 introduction conference framework phpunit release podcast interview rest example language functional development database zendframework2 usergroup testing

All content copyright, 2013 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework