Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- CMS - Admin Controls
September 6, 2005, 7:31 am
rate this thread
Management System to be used by out school. It has
gotten to the stage where I'm going to have to
start building admin pages so that others can be
admins, So I'm going to have to rewrite several
pages to cater for this. What I'm wondering is,
what is the best way to store admin variables?
Should I put them in a table in MySQL or in a flat
file? Do you think that it would slow my server
down conciderably if I added another 3 sql querys
to every page and had 100 users on using the site
I'm running it on an IIS server (Server 2003)
which is not normal for me (I like my Linux), so
I'm just hoping it doesn't eat away all the memory
slowly throughout a day.
I know a couple of poeple have created and
contributed to CMS' before so if you have any tips
or pointers in this area let me know.
Re: CMS - Admin Controls
why dont you use a table like ipb, i think it is, use. This being a
config table with the column names "config_name" and "config_value".
You can then use one query to pull out all the information.. then:
$sql = "SELECT * FROM `config`";
$dosql = mysql_query($sql,$connect);
while($item = mysql_fetch_assoc($dosql))
$config[$item['config_name']] = $item['config_value'];
..and then you have all of your config values?
You could even set access levels for all of your admins, to only pull
the variables that they are allowed to access by adding an
"access_level" to the table and changing the sql to "SELECT * FROM
`config` WHERE `access_level` <= '".$my_access_level."'";
How would 100 users be in the admin area? If thats what you meant by
the 3 more queries..
- » compiling error with php 5.0.4 on Gentoo Linux 2005.1
- — Previous thread in » PHP Scripting Forum