Click to See Complete Forum and Search --> : Which way would you prefer / sugest ?


AlionSolutions
November 23rd, 2004, 08:09 PM
Hi out there,
as I am experimenting a lot, I decided to write a little content management system for my rather weird website that should soon relaunch in 100% PHP :D :D :D

Ok, serious, I am in a decision problem:

I want to store some settings for the page like titles, infotext, subtitles etc. pp. somewhere. There are two ways to do this, that came in my mind:

1. store them all in file(s) on the server
2. store them in a table of a mysql database

Yepp, and that's it. I am pretty new to php and mysql, but the mysql-table-solution looks soooooooo smart, that I can hardly avoid to do it that way. But on the other hand, what happens if thousands :D :D :D of visitors of my webpage try to reach the page, bothering the poor mysql-base of my ISP.

I need some advice from you php/mysql-professionals here. You MUST know, that the page that I am talking about is hosted by a medium class ISP and he provides a mysql-server of which we as users only know that it exists and most of the time works pretty fast and fine.

So, what do you suggest: Use the smart, fancy, cool and spacie way of the mysql-table or the old fashioned, boring, grey but reliable txt-files in he pagedir ?

Yeah, this is interesting. I hope this is no start of some flamewar between you guys 'n girls :D :D :D

Greetinx

alionsonny

khp
November 23rd, 2004, 10:38 PM
I suppose it really depends on the data.
I it's just a small number of static captions, the most efficient and easiest solution is to create a php file that only sets a number of variables to hold the captions. And then include this php file from your main php files.

If you are working with a large dataset, using a database like mysql will most likely be the better option, it may even be less stressfull for the server than storing all yor data in text files.

cilu
November 30th, 2004, 10:09 AM
1. store them all in file(s) on the server
2. store them in a table of a mysql database

I didn't really understand what data do you want to store: titles, subtitles, etc. or settings about them, line font, color, size, etc. If it is about settings why don't you use CSS?

One pro for using a mysql table is that you don't have to worry about parsing a txt file each time you need some data from it.

AlionSolutions
November 30th, 2004, 10:32 AM
Oh, I forgot that thread. I am through with this. I changed my site-design to pure-css and that solved all my problems in a great way.

Thanx

alionsonny