Thread: Need Help

    #1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2000
    Posts
    70
    Rep Power
    15
    Hi,

    I tried to insert a image to the database but whenever I do I get a error message called 'invalid hex code' any idea guys?

    Raaj
  2. #2
  3. No Profile Picture
    Carpe Diem
    Guest
    Devshed Newbie (0 - 499 posts)
    You are best not to put the image into the database but put the full path to the image in a text field.

    Storing images in a database is very slow.



    ------------------

    Regards
    Darren
    --
    http://www.php4hosting.com/ $
    http://www.php4hosting.co.uk/
    PHP/MySQL Enabled Hosting/Dedicated Servers
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2000
    Posts
    0
    Rep Power
    0
    Just wondering ...
    how do you store an image in a db (not the path), in mysql lets say .. ?

    ------------------
    **********************
    Holev Ezim
    webmaster@builder.co.il
    **********************
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2000
    Location
    Seaside, CA
    Posts
    84
    Rep Power
    15
    Here's a tutorial:
    http://www.phpbuilder.com/columns/florian19991014.php3

    ------------------
    From the day we're born, we're running out of time.
  8. #5
  9. Banned (not really)
    Devshed Supreme Being (6500+ posts)

    Join Date
    Dec 1999
    Location
    Brussels, Belgium
    Posts
    14,645
    Rep Power
    4492
    I will never ever understand why people want to do this. You're adding the overhead of connecting to a database and retrieving the data in order to show a simple image. For what benifit?? Can someone explain?

    ---John Holmes
  10. #6
  11. No Profile Picture
    Apprentice Deity
    Devshed Loyal (3000 - 3499 posts)

    Join Date
    Jul 1999
    Location
    Niagara Falls (On the wrong side of the gorge)
    Posts
    3,237
    Rep Power
    19
    Because they want to be clever?

    I had to do it once because the client insisted. Logic couldn't prevail.
  12. #7
  13. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2000
    Posts
    70
    Rep Power
    15
    Hi Guys,

    It is not the question of being clever Rod.

    I have several running in several machines so we wanted to have a singel database where data can be accessed without any problem. So our senior people wanted to have everything in the database including the images.

    Raaj
  14. #8
  15. No Profile Picture
    Apprentice Deity
    Devshed Loyal (3000 - 3499 posts)

    Join Date
    Jul 1999
    Location
    Niagara Falls (On the wrong side of the gorge)
    Posts
    3,237
    Rep Power
    19
    The URL to the file can be stored on a shared db as well.

IMN logo majestic logo threadwatch logo seochat tools logo