SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Thread: My Database

  1. #1
    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 have been developing a CMS (Content Management System) for a while now, and I have a few questions.

    All the pages, except the individual pages (like the specific article pages at Site Point) are generated into static pages (from a mysql database). Would there be a lot of server strain if you put in a "While Loop" into those individual pages, so that everytime someone visits any of those pages, it would run that while loop? I am talking about a site that gets quite a bit of traffic.

    The way I have setup my php templates is by putting in a lot of "If" statements. IE: For the articles I have something like "If (isset($articleresult)):"
    Now is that a good idea (overall) or would it be better to seperate all the areas into their own individual template files? I like the idea of only having 1 or 2 php templates for my whole site, instead of having 5 or 6.

    Thanks in advance!

    Chris Roane

  2. #2
    SitePoint Evangelist
    Join Date
    May 2000
    Location
    Canada
    Posts
    533
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    if you have more files with less loops and ifs and stuff, you're going to put less strain on the CPU, increasing overall performance, in my opinion... but the performance difference will only be noticed if you have enough visitors to actually "fill up" your server's capabilities

    ------------------------
    SitePoint Moderator
    ( myONLYhost.com ) ( geekarea.org )

  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)
    Thanks Vinay

    I think I will just use the two templates for now, and if I start getting a lot of traffic, then I will break up those two templates into more files.

    Thanks!

    Chris Roane


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
  •