Content-type : plain/text

Not for 'how-to' coding questions but PHP theory instead, this forum is here for those of us who wish to learn about design aspects of programming with PHP.

Moderator: General Moderators

Post Reply
Gen-ik
DevNet Resident
Posts: 1059
Joined: Mon Aug 12, 2002 7:08 pm
Location: London. UK.

Content-type : plain/text

Post by Gen-ik »

Would everyone agree that it's probably better to use plain/text files to store data (less than 128 characters) rather than MySQL if the files only need to be accessed now and again?

I know the TXT vs MYSQL thing has been done to death and I don't want to start another one rolling... this is just a simple "small ocassional files = plain/text" question :)
User avatar
phpScott
DevNet Resident
Posts: 1206
Joined: Wed Oct 09, 2002 6:51 pm
Location: Keele, U.K.

db

Post by phpScott »

My general philosphy is that if I have access to a db I will use a db because you never know when seldom accessed or changed becomes alot.

But occasionaly I have broken that rule and used files like and you said for simple, not accessed very much bit of info, like user info or the like.

As for speed which would be faster I have a strange hunch that it would be the db. :D

phpScott
McGruff
DevNet Master
Posts: 2893
Joined: Thu Jan 30, 2003 8:26 pm
Location: Glasgow, Scotland

Post by McGruff »

mysql v txt?

mysql === txt :wink:
evilMind
Forum Contributor
Posts: 145
Joined: Fri Sep 19, 2003 10:09 am
Location: Earth

Post by evilMind »

use a db if you can. I mean, when you look at it, either way you go your info is going to be stored in a file ;)
Cruzado_Mainfrm
Forum Contributor
Posts: 346
Joined: Sun Jun 15, 2003 11:22 pm
Location: Miami, FL

Post by Cruzado_Mainfrm »

u can even save space, if u have many files, in a db they'll take less space if u set the compression to on
Post Reply