October 26th, 2000, 02:07 AM
At the moment I store and retrieve templates from a MySQL db (all the data from the site is also called from mysql), but I've heard that it would be better to store them in text files? Any comments?
October 26th, 2000, 05:51 AM
it doesn't really matter that much
i've made a website management system in php
with different modules (file/user/forum) also
with a sort of template system
and i put all the data, even the files in a mysql db, it can be slower to get the data out of the database, but on a fast machine it can be faster..
i think it's better to store in a database
or else u still have to store the filename/id in a database, and still make a db connection etc..
well, let me hear if u know more
October 26th, 2000, 06:50 AM
depends exactly what you mean by templates!
if you have lots of static variables that may be used on several pages then include()ing a text file is quicker.
If you have large amounts of data where some of which will be used on this page and some on that - then a DB may be a better option - but really only for large amounts of data - not for a short list of vars.
I think MySQL is overused!- because it is so fast people store images & all sorts in them when it is probably best left for fast SQL queries for dynamic data production/manipulation.