For Programmers: Free Programming Magazines  


Home > Archive > PHP SQL > February 2006 > Should I use text files?









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Should I use text files?
Tony Peardon

2006-02-08, 9:16 am

Hi,

I'm building an online project manager. Within my database, I have a table
named projects which stores data about various projects. For each project, I
require an overview, which could be as short as a single sentence, or as
long as multiple paragraphs, so what is the best way of storing a project
overview?

I was thinking that the table could store a file name, and then PHP could
open that file, but that seems like a work-around, rather than a solution.
There must be a better way, but what is it?

Keep in mind that I am new to both PHP and mySQL, but I do have extensive
experience with other languages. I expect that there might be a data type
explicitly for loading text files, but I just don't know. Any comments or
suggestions would be greatly appreciated.

Thanks in Advance,
Tony.


J.O. Aho

2006-02-08, 9:16 am

Tony Peardon wrote:
> Hi,
>
> I'm building an online project manager. Within my database, I have a table
> named projects which stores data about various projects. For each project, I
> require an overview, which could be as short as a single sentence, or as
> long as multiple paragraphs, so what is the best way of storing a project
> overview?
>
> I was thinking that the table could store a file name, and then PHP could
> open that file, but that seems like a work-around, rather than a solution.
> There must be a better way, but what is it?


Store the text in the database, you can use the type TEXT for the column.
If you store things in a file, you need to make a directory where you store
the text files writable for the webserver, which lowers in general the
security of the system and you need to have code to verify that the file is
there and is readable. You get a lot less job just working with the database.



//Aho
pjSoni

2006-02-08, 9:16 am

Hi Friend,

Why are you wasting your time in developing project managing tool It's
already free available in net from sourceforge.
Project Name : NetOffice

Regards,
Jatin

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com