how to save and retrieve an image using mysql and php

Reply

Join Date: Feb 2008
Posts: 90
Reputation: bornok15 is an unknown quantity at this point 
Solved Threads: 2
bornok15 bornok15 is offline Offline
Junior Poster in Training

how to save and retrieve an image using mysql and php

 
0
  #1
Apr 11th, 2008
I want to put image uploading in my page and i searched all over the net for some ways on doing this and its seems like almost all of the ways states that i should save it in the database itself not i directories. Will the image retain its properties from its original file upon retrieving a saved image? Can anyone help me how to do this? tanx..
Reply With Quote Quick reply to this message  
Join Date: Jun 2007
Posts: 1,227
Reputation: kkeith29 has a spectacular aura about kkeith29 has a spectacular aura about kkeith29 has a spectacular aura about 
Solved Threads: 167
kkeith29's Avatar
kkeith29 kkeith29 is offline Offline
Nearly a Posting Virtuoso

Re: how to save and retrieve an image using mysql and php

 
0
  #2
Apr 12th, 2008
never put an image into the database itself. just upload them into a directory and put the path to file in the database.
Reply With Quote Quick reply to this message  
Join Date: Dec 2007
Posts: 190
Reputation: mwasif is an unknown quantity at this point 
Solved Threads: 25
mwasif mwasif is offline Offline
Junior Poster

Re: how to save and retrieve an image using mysql and php

 
0
  #3
Apr 13th, 2008
It is always better to store the images on disk instead of database. File operations are always faster than database. Saving the images on disk will reduce your database size which will give you comfort when moving database or mainting database.

Don't save images in database unless you have some special requirements.

But if you still interested to same images in database then here is a small post to save images in database.
Reply With Quote Quick reply to this message  
Join Date: Feb 2009
Posts: 1
Reputation: shohel_nub is an unknown quantity at this point 
Solved Threads: 0
shohel_nub shohel_nub is offline Offline
Newbie Poster

Re: how to save and retrieve an image using mysql and php

 
0
  #4
Feb 10th, 2009
Originally Posted by kkeith29 View Post
never put an image into the database itself. just upload them into a directory and put the path to file in the database.
but in folder the image take more space than database so far i know; so will it be not wise to use database ?
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Other Threads in the PHP Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC