SitePoint Sponsor |
|
User Tag List
Results 1 to 3 of 3
Thread: My Database
-
Aug 27, 2000, 22:01 #1
- 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
-
Aug 27, 2000, 22:23 #2
- 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 )
-
Aug 28, 2000, 13:18 #3
- 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