RE: Re: [PHP-DB] Problems with images in the db

From: Date: Thu, 15 Feb 2001 11:35:49 +0000
Subject: RE: Re: [PHP-DB] Problems with images in the db
Groups: php.db 
Request: Send a blank email to php-db+get-6656@lists.php.net to get a copy of this message
> P.S. Of course if you wanted new text to appear ON your > image, you may put it in with corresponding Image* > functions. Or use a table: <TABLE width='xx' height='xx'> <TR> <TD background='image.jpg' valign='bottom'> My Description </TD> </TD> </TABLE> I personally can't see any benefit to storing binary image data in a database. You most certainly cannot search it, and if you need to edit/view the image, you need to convert it into an image file anyway. At Cinema.com we store all the images as a file and link to the filename in the database. _____ ~ Richard Allsebrook ~ Applications Developer and Webmaster Easysoft Limited, Thorp Arch Grange, Thorp Arch, Wetherby, LS23 7BA, UK http://www.easysoft.com <http://www.easysoft.com> - http://www.cinema.com <http://www.cinema.com> "A computer lets you make more mistakes faster than any invention in human history - with the possible exceptions of handguns and tequila." _____ -----Original Message----- From: stas.t [mailto:stas.t@cpstc.com] Sent: Thursday, February 15, 2001 12:00 PM To: php-db; stas.t Subject: FW: Re: [PHP-DB] Problems with images in the db Hello, Sunil Jagarlamudi! You wrote: > How do I overcome that ? When I try to just echo the > image it works fine, > but when I try to add a few more lines like echoing > other rows which have firstname and lastname of the > people nothing comes out Imagine you open an image file from the disk. What happens if someone adds a line of text to that file? We don't know, will the image be scrapped or not, but you will surely not get any new text on or below that image. This is what you are trying to do. Now imagine you open an HTML file with an <IMG> tag pointing to that image, and having additional <P> tag describing that image. This is what you need. Now to your problem: to reproduce the above behavior you got to use two scripts: one to show an image from your database and other to point to that script in its <IMG> tag and having additional info. Something like that: <IMG SRC="image.php?file=jsmith-small" WIDTH=100 HEIGHT=150> P.S. Of course if you wanted new text to appear ON your image, you may put it in with corresponding Image* functions. -- Piloteers do it on the road -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net For additional commands, e-mail: php-db-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net

Attachment: [application/rtf]
« previous php.db (#6656) next »