Re: [PHP] MySQL and images
In order to speed-up queries, it is suggested that you DO NOT store images in the database. Rather, store the images in files and store file names in the database. - Original Message - From: "John Meyer" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, October 29, 2002 9:32 PM Subject: [PHP] MySQL and images Assuming that I have to for some unknown reason, are there any articles on storing images in the database and retrieving them? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] MySQL and images
Know that, believe that, been preaching that, but I just want to know just in case. Actually found the article. -Original Message- From: Rick Emery [mailto:remery@;emeryloftus.com] Sent: Tuesday, October 29, 2002 8:46 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] MySQL and images In order to speed-up queries, it is suggested that you DO NOT store images in the database. Rather, store the images in files and store file names in the database. - Original Message - From: "John Meyer" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, October 29, 2002 9:32 PM Subject: [PHP] MySQL and images Assuming that I have to for some unknown reason, are there any articles on storing images in the database and retrieving them? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] MySQL and images
There are times, especially in highly dynamic situations, where backing up and restoring of images and metadata from a database or for security reasons, where storing the images within a database makes real sense. Separating the physical storage areas for the two types of data (metadata & images) and keeping the image data from being buffered into the database server's memory space can make storage within the database almost as efficient as file storage. Mark C. Mark C. -Original Message- From: Rick Emery [mailto:remery@;emeryloftus.com] In order to speed-up queries, it is suggested that you DO NOT store images in the database. Rather, store the images in files and store file names in the database. - Original Message - From: "John Meyer" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, October 29, 2002 9:32 PM Subject: [PHP] MySQL and images Assuming that I have to for some unknown reason, are there any articles on storing images in the database and retrieving them? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Mysql and Images
If I understand you right, then what you want is just impossible. You have to give a source as filepath. You can't put the binary picture data into the same output. What you could is to have a file which calls itself with params telling it to output now the image instead of the html e.g. example.php which produces without given parameters html like You can then check in the example.php file if $showimage is set. if it is set then you call a function to send correct header and binary data and die afterwards (better: exit ;-) But due hold it more simple I would hardly suggest you to have image-output functions in a separate file. You can still use that file for all images in your database If I misunderstood you and you just want a sample code for outputting picture-data then look at this: I hope I could help you Stefan Rusterholz, [EMAIL PROTECTED] -- interaktion gmbh Stefan Rusterholz Zürichbergstrasse 17 8032 Zürich -- T. +41 1 253 19 55 F. +41 1 253 19 56 W3 www.interaktion.ch -- - Original Message - From: "Rodrigo Peres" <[EMAIL PROTECTED]> To: "PHP" <[EMAIL PROTECTED]> Sent: Tuesday, November 13, 2001 3:32 PM Subject: [PHP] Mysql and Images > His list, > > I have some images stores in a mysql database and now i need to recover them > to put in a html. My question is there's a way to do this in the same page, > I mean, withou the need to buil another php page that process th image? > Something like a function that output the image to the in the > html. > > Thank's in advance > > Rodrigo Peres > -- > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]