#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2000
    Posts
    41
    Rep Power
    14
    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?
  2. #2
  3. No Profile Picture
    Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2000
    Posts
    6
    Rep Power
    0
    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

    ------------------
    Greetings lewi
  4. #3
  5. Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Feb 2000
    Location
    Perth West Australia
    Posts
    757
    Rep Power
    15
    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.

    ------------------
    Simon Wheeler
    FirePages -DHTML/PHP/MySQL

Similar Threads

  1. Best way to store data
    By valensnow in forum MySQL Help
    Replies: 0
    Last Post: February 16th, 2004, 10:39 PM
  2. Replies: 0
    Last Post: February 10th, 2004, 04:43 PM
  3. Nested templates in Dreamweaver MX 2004
    By switcha in forum Web Design Help
    Replies: 2
    Last Post: January 30th, 2004, 08:35 AM
  4. store values
    By superman in forum PHP Development
    Replies: 2
    Last Post: July 7th, 2003, 01:58 AM
  5. Replies: 6
    Last Post: January 27th, 2003, 12:16 PM

IMN logo majestic logo threadwatch logo seochat tools logo