Results 1 to 3 of 3
  1. #1
    ABW Ambassador Doug247's Avatar
    Join Date
    January 18th, 2005
    DE USA
    Question Storing articles in MySQL
    What is the best way to store articles in a MySQL database?

    I want to be able to store small (2 or 3 paragraph) articles in a database and use it as content for a content site. I am already doing this to a degree. The problem is that the source text files have hidden characters for carriage returns, tabs, and line feeds. In a PHP script I can pull an article but it is not really formatted nicely because of the hidden characters that were transferred from the text file to the database. Am I making sense??

    How to get the text formatted properly and make sure my MySQL database is also setup properly?


  2. #2
    The Great Egress NewcastleB's Avatar
    Join Date
    January 19th, 2005
    You should be able to use str_replace() to find the \n new lines and \t tabs in the text and replace them with whatever you want.
    But are you still master of your domain?

  3. #3
    Join Date
    June 9th, 2005
    Try the nl2br() function.


  4. Newsletter Signup

+ Reply to Thread

Similar Threads

  1. Product specific articles or generic articles
    By TechMan in forum Commission Junction - CJ
    Replies: 6
    Last Post: November 13th, 2010, 12:53 PM
  2. MySql help?
    By bsnrjones in forum Programming / Datafeeds / Tools
    Replies: 7
    Last Post: March 5th, 2004, 01:47 PM
  3. MySQL
    By Dirk in forum Midnight Cafe'
    Replies: 4
    Last Post: February 21st, 2004, 05:44 PM
  4. MySQL Help!
    By Pete in forum Programming / Datafeeds / Tools
    Replies: 1
    Last Post: April 29th, 2002, 02:44 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts