Re: [PHP-DB] Saving Image in mySQL

2013-03-20 Thread Gavin Chalkley
I am with Karl on this. Storing an image in the db is very heavy on lpad times. Upload the image to a folder with name saved with location On Mar 19, 2013 11:12 PM, Karl DeSaulniers k...@designdrumm.com wrote: Hey Ron, I don't know how others feel, but I say save yourself a headache and dont

Re: [PHP-DB] Saving Image in mySQL

2013-03-20 Thread Karl DeSaulniers
Ron, If your hell bent on storing the image data. :P I would say base64 the data and use a blob or text then read it out using something like.. $image = 'img src=data:'.$image_data.' /'; echo($image); I would also say your individual image max size should be 50k or less. If your storing product

Re: [PHP-DB] Saving Image in mySQL

2013-03-20 Thread Toby Hart Dyke
You're right - you're pulling $file out of thin air. Once uploaded, the file is stored in $_FILES['file']['tmp_name'], and you need to manually read the data into $file yourself. Something like: file_get_contents($_FILES['file']['tmp_name']) Toby On 3/19/2013 8:15 PM, Ron Piggott

Re: [PHP-DB] Saving Image in mySQL

2013-03-20 Thread Jim Giner
Absolutely - do not store any images in a db. Makes no sense. The data (the image) is static, basically safe from alteration or changing in any way, so what is the need? Save the location/name of the image only and store all of them in one (or more) secured folders on the server. No db

Re: [PHP-DB] Saving Image in mySQL

2013-03-20 Thread Jim Giner
On 3/20/2013 8:43 AM, Toby Hart Dyke wrote: You're right - you're pulling $file out of thin air. Once uploaded, the file is stored in $_FILES['file']['tmp_name'], and you need to manually read the data into $file yourself. Something like: file_get_contents($_FILES['file']['tmp_name'])