Jump to content

MySQL - saving article text in database


trassalg

Recommended Posts

I'm putting together a site for a friend to use as a local database management tool.  Basically, he'll store the date of the entry, the number of the entry, category of the entry and a magazine article's text.

 

Is it risky (and/or stupid) to save the magazine articles' texts in the database or better to have them stores in some sort of text file, referenced by the php site?

 

Any ideas/opinions would be appreciated.

Link to comment
Share on other sites

I store it in the database.

 

It probably depends on how long the main body of the news is going to be.  If it's normally quite big, then use files.  If it's average (I dunno, maybe under 8k characters?) then keep it in the database.

 

Obviously, it's easier to use and maintain it if it is in a database.  I see no disadvantage to it, either, but I'm not extremely experienced, so don't go by my opinion alone!

Link to comment
Share on other sites

I appreciate the quick reply.  I'm obviously new to the whole database concept and based on what I've been reading in PHP & MySQL For Dummies, was kind of concerned as it mentions that you should try and have a good idea of the size (or rather, max size) of the content that's going into the datatbase.  As the articles' text will obviously be a dynamic thing, each article being unique, I wasn't quite sure.

 

So then, as a followup question, is there an easy way to, by using php to create a txt file, enter text in the form fields, and have all but one field be entered into the database (the other field being fed to a new txt file that's numbered sequentially)?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.