News Feed
Sections




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

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

PHPClasses.org: Lately in PHP, Episode 32 - Zend Optimizer+ Cache in PHP 5.5 & MySQL 5.6

FedoraNews.org: How to install Fedora Core 4 Server with the latest AMP Support

DevShed: Creating a MySQL Abstraction Layer with Bridge Classes in PHP 5

Internet Super Hero Blog: PDO_MYSQLND for PHP preview released

Job Posting: Engage Seeks a PHP/MySQL Applications Developer (Work from Anywhere)


Community Events

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


application api community series part2 conference configure laravel php7 introduction voicesoftheelephpant opinion symfony2 performance framework example release library podcast interview

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