PHP
  Home arrow PHP arrow Building a Relational Content Management System in PHP/MySQL
Dev Shed Forums  
Administration  
AJAX  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Smartphone Development  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Mobile Linux  
App Generation ROI  
IBM® developerWorks  
Forums Sitemap  
E-Commerce Hosting  
Linux Web Hosting  
Managed Hosting  
Small Business Hosting  
VPS Hosting  
Weekly Newsletter

 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid  
Request Media Kit
Contact Us  
Site Map  
Privacy Policy  
Support  
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
PHP

Building a Relational Content Management System in PHP/MySQL
By: Roger Stringer
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: starstarstarstarstar / 31
    2005-12-20


    Table of Contents:
  • Building a Relational Content Management System in PHP/MySQL
  • The Rewrite
  • The Common Functions
  • Managing Articles
  • Displaying the Articles

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      error-file:tidyout.log Del.ici.ous error-file:tidyout.log Digg
      error-file:tidyout.log Blink error-file:tidyout.log Simpy
      error-file:tidyout.log Google error-file:tidyout.log Spurl
      error-file:tidyout.log Y! MyWeb error-file:tidyout.log Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article

     
     
    ADVERTISEMENT


    Building a Relational Content Management System in PHP/MySQL
    ( Page 1 of 5 )

    You may be familiar with relational databases, but what is a relational content management system? Read on to learn how to build this system, which helps you create a search engine friendly site fairly quickly.

    Introduction

    This article will show you how to build a simple relational content management system. What is a relational CMS you ask? Well, a relational CMS lets you create articles that have child articles.

    This works similiar to other CMSes which have categories and then articles; we will just combine them together to be more relational.

    This also helps to create a nice search engine friendly site quickly.

    To keep this article easy to follow, I'll keep the relational CMS simple, but you can change it quite easily to add more stuff to it.

    The Database

    Our first step is to build the database. This is a pretty basic database designed for the articles. We'll need one table for this.

    CREATE TABLE articles (
        id BIGINT( 24 ) NOT NULL AUTO_INCREMENT ,
        title VARCHAR( 150 ) NOT NULL ,
        summary TEXT NOT NULL ,
        body TEXT NOT NULL ,
        parent BIGINT( 24 ) NOT NULL ,
        seoname VARCHAR( 150 ) NOT NULL ,
        PRIMARY KEY ( id ),
        KEY title(title),
        KEY seoname(seoname),
        KEY parent(parent)
    );
    INSERT INTO articles SET id='1',title='first page',seoname='firstpage';

    You may notice that we also created the first article. We need to have an initial article for the system. You'll also see later that, while you can edit this article all you want, you can't delete it; it is the first page.



     
     
    >>> More PHP Articles          >>> More By Roger Stringer
     

       

    PHP ARTICLES

    - Building Dynamic Queries with Chainable Meth...
    - PHP Encryption and Decryption Methods
    - Building a MySQL Abstraction Class with Meth...
    - Completing a Sample String Processor with Me...
    - Mastering WHILE Loops for PHP and MySQL
    - Method Chaining: Adding More Methods to the ...
    - Method Chaining in PHP 5
    - The Role of Interfaces in Applying the Depen...
    - Dependency Injection: Using a Setter Method ...
    - Using a Model Class with the Dependency Inje...
    - Injecting Objects Using Setter Methods with ...
    - Injecting Objects by Constructor with the De...
    - The Dependency Injection Design Pattern in P...
    - Performing Inferential Statistical Analysis ...
    - Performing Descriptive Statistical Analysis ...





    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 1 Hosted by Hostway
    Stay green...Green IT