SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member
    Join Date
    Jul 2000
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi folks

    This is a follow up on my previous posting on content management system (cms).

    I decided to make my own CMS so I got mySQL and PHP installed. I have previously created a simple news system in ASP (access db) so I'll start out by converting it to PHP and thereby learn the basics of php/mysql.

    The next addition to my CMS is for it to be able to handle multi-paged articles. On this specific topic I have no previous experience so I'm looking for some ideas and hints on how to implement/handle this.

    Here is my suggestion of a db table structure:

    Article_header
    --------------
    articleID (Primary key/Auto_INCREMENT)
    AuthorID (foreign key)
    Title
    DescriptionText
    Date

    Header_pages
    ------------
    ArticleID
    PageID
    Primary Key (ArticleID, PageID)

    ArticlePages
    ------------
    PageID (Primary key/Auto_INCREMENT)
    PageTitle
    PageBody (text)

    To show the specific article page I'll create show_article.php that have the parameters ArticleID and pageID.

    Any suggestions and comments welcome. BTW, Thank you for all the replies.

    TIA,

    Jeff Jensen

  2. #2
    SitePoint Author Kevin Yank's Avatar
    Join Date
    Apr 2000
    Location
    Melbourne, Australia
    Posts
    2,571
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    While adding a database table to handle individual article pages is compelling from a data normalization (relational database design) standpoint, it is rarely practical.

    Before you jump into that database design (which, incidentally, would need a third column in your Header_pages lookup table to allow you to set a page order), have a look at the solution presented in Part 7 of my tutorial series: "Building a Database-Driven Web Site using PHP & MySQL".

    ------------------
    -Kevin Yank.
    http://www.SitePoint.com/
    Helping Small Business Grow Online!

  3. #3
    SitePoint Addict Chris Roane's Avatar
    Join Date
    Jul 1999
    Location
    Helena, MT
    Posts
    287
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi,

    I used that part of Kevin's tutorial to create multi paged articles and it works great and it is very easy to implement into your php code.

    Chris Roane

    ------------------
    Web Services: DevStorm | Intersurge
    Web Tools: Web Site Resource | Free Web Site Tools


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •