Home arrow PHP arrow Building a Relational Content Management System in PHP/MySQL

Building a Relational Content Management System in PHP/MySQL

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.

  1. Building a Relational Content Management System in PHP/MySQL
  2. The Rewrite
  3. The Common Functions
  4. Managing Articles
  5. Displaying the Articles
By: Roger Stringer
Rating: starstarstarstarstar / 39
December 20, 2005

print this article




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 (
    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

blog comments powered by Disqus
escort Bursa Bursa escort Antalya eskort


- Hackers Compromise PHP Sites to Launch Attac...
- Red Hat, Zend Form OpenShift PaaS Alliance
- PHP IDE News
- BCD, Zend Extend PHP Partnership
- PHP FAQ Highlight
- PHP Creator Didn't Set Out to Create a Langu...
- PHP Trends Revealed in Zend Study
- PHP: Best Methods for Running Scheduled Jobs
- PHP Array Functions: array_change_key_case
- PHP array_combine Function
- PHP array_chunk Function
- PHP Closures as View Helpers: Lazy-Loading F...
- Using PHP Closures as View Helpers
- PHP File and Operating System Program Execut...
- PHP: Effects of Wrapping Code in Class Const...

Developer Shed Affiliates


Dev Shed Tutorial Topics: