SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Zealot
    Join Date
    Mar 2011
    Posts
    146
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question good practice | industry standard

    Hi,

    I am currently undertaking a training exercise which requires that
    an image be inserted, stored and retrieved from a mysql database via php.

    Ive read on various other online sources that this isnt a good way to go because
    of the amount of resources it uses.

    Is this the case,

    what is the industry standard?

    what is an alternative option?

    Im quite new to database intergration and would appreciatte all insights into this area , to help me get an idea of the big picture.

  2. #2
    Utopia, Inc. silver trophy
    ScallioXTX's Avatar
    Join Date
    Aug 2008
    Location
    The Netherlands
    Posts
    8,895
    Mentioned
    138 Post(s)
    Tagged
    2 Thread(s)
    The most commonly accepted way is to store the actual image on the disk and then store the path to the image in the database.
    Simply because that way the web server (apache, lighttpd, etc) can serve the image as a static file, instead of php having to pipe through a blob from a database, which is much more expensive in terms of resources (which is what you'd have to do if you stored the image in a database).
    Rémon - Hosting Advisor

    Minimal Bookmarks Tree
    My Google Chrome extension: browsing bookmarks made easy

  3. #3
    SitePoint Zealot
    Join Date
    Mar 2011
    Posts
    146
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Talking thank you

    thanks heaps thats really helped me out


Tags for this Thread

Bookmarks

Posting Permissions

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