Miscellaneous Code

  Home arrow Miscellaneous Code arrow Completing a Model for the CodeIgniter...
MISCELLANEOUS CODE

Completing a Model for the CodeIgniter PHP Framework
By: Alejandros Gervasio
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 2
    2009-09-23

    Table of Contents:
  • Completing a Model for the CodeIgniter PHP Framework
  • Performing generic SQL queries
  • Completing the AbstractModel class
  • The generic model class's full source code

  •  
     

    SEARCH CODEWALKERS

    TOOLS YOU CAN USE

    advertisement

    Completing a Model for the CodeIgniter PHP Framework


    (Page 1 of 4 )

    One of the most remarkable features offered by the CodeIgniter PHP framework is its great flexibility, which lets web developers build custom libraries that contribute to extending the framework’s core functionality. In this group of articles you’ll learn how to create a generic model class for CI. The class will permit you to perform CRUD operations against a number of database tables in a truly painless fashion, without having to spend a long time coding numerous and complex models.

    Of course, if you've been a patient reader and already went through all of the previous tutorials of this series, then by this time you’ll hopefully have a very clear idea of how to build a generic model class for CodeIgniter. In those articles I not only proceeded to define such a class, but progressively added several features to it, including capabilities for retrieving, saving and deleting database rows, as well as for validating data passed to the model.

    Despite the fact that all of the features shown before are indeed very useful, the model class in its current state is still incomplete. It lacks methods that allow it to perform generic SQL statements, clean up its set of properties and so forth. Therefore, in this penultimate chapter of the series, I'm going to incorporate a few additional methods into the model class that will be tasked with executing these all of these specific operations.

    It's time to get this generic model classy completed. Let’s do it right now!

    More Miscellaneous Code Articles
    More By Alejandros Gervasio

    blog comments powered by Disqus

    MISCELLANEOUS CODE ARTICLES

    - Creating a Web Page Controller with the HMVC...
    - Coding Controllers and Views for the HMVC De...
    - A Sample Web Application with the HMVC Desig...
    - Adding a Class to Parse Views to an HMVC Des...
    - Building a Model Class for the HMVC Design P...
    - Filtering Input Data and Generating HTML For...
    - The HMVC Design Pattern: Working with MySQL ...
    - Dispatching Requests to MVC Triads with the ...
    - Implementing the Hierarchical Model-View-Con...
    - A Web App Based on a Model for the CodeIgnit...
    - Completing a Model for the CodeIgniter PHP F...
    - Validating Input Data with the CodeIgniter P...
    - Deleting Database Records with the CodeIgnit...
    - Inserting Database Records with a CodeIgnite...
    - Fetching Database Rows with a Model for the ...

    Developer Shed Affiliates

     



    © 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap