On Sat, November 4, 2006 11:26 am, Alain Roger wrote: > I create a table with some large object (ref: OID) to store some > images. > When my PHP will display some data, it will also display the images > stored > as OID. > > However, i've read that before i must restore the image by exporting > them to > local (on server) file. > > isn't it easier in this case, to simply store the path and file name > of file > to DB and just read the data to display image on PHP pages ? > what is the purpose in this case to store image a bytea / large object > ? > > moreover, how my php code will load image from DB and stored there as > OID ? > isn't it too much complex in comparison with just storing path and > name of > image ? Yes, it will probably be easier all around to de-clutter your DB and just store the images on the file system, which is itself a highly-tuned mass-storage specialized database system. :-) You would *NOT* need to store the file temporarily on the hard drive: <?php $image_data = some_function_to_get_image_date_from_OID($OID); header("Content-type: image/jpeg"); echo $image_data; ?> No temp file needed. This DB versus file system for images has been debated on this list before. Check the archives. -- Some people have a "gift" link here. Know what I want? I want you to buy a CD from some starving artist. http://cdbaby.com/browse/from/lynch Yeah, I get a buck. So? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php