#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2000
    Posts
    1
    Rep Power
    0
    Hi.

    I'm going to start a news-system. I planned the database, but I'm not sure how to place the images into a generated form.

    The database (partial) is:

    article_id int
    author_id int
    date date
    title varchar (50)
    body varchar --> here comes the html source
    links, etc...

    It is a good way to place the image path into the html (img src...) and store the images in a specified directory, or easier to place the binary file into the database (pgsql)??

    Can somebody help me which is the best?
    And what is better for the body, the article in a html file, and in the database only the link or the html source in the database.
  2. #2
  3. Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Feb 2000
    Location
    Perth West Australia
    Posts
    757
    Rep Power
    15
    It seems daft to me to place the image in the database itself - although many people do.

    I just store a reference to the image either by creating a field specifically for this purpose , or even better naming the image after the id of the db record, ie if a record has a unique id of 30 , then the image that relates to that record is stored as 30.jpg etc.

    Just seems faster than pulling an image out of the database itself.

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

Similar Threads

  1. Custom CMS for News and Reviews web site?
    By KentP in forum Project Help Wanted
    Replies: 2
    Last Post: February 14th, 2004, 12:15 AM
  2. Replies: 1
    Last Post: January 30th, 2004, 03:10 AM
  3. Parsing News Feeds
    By jessenco in forum XML Programming
    Replies: 1
    Last Post: January 21st, 2004, 03:13 AM
  4. XML Flash News Ticker
    By jessenco in forum Flash Help
    Replies: 0
    Last Post: January 19th, 2004, 04:23 PM
  5. Replies: 1
    Last Post: January 11th, 2004, 11:28 PM

IMN logo majestic logo threadwatch logo seochat tools logo