Re: pulling images from a database
| From: | Gary Huntress | Date: | Tue, 22 May 2001 21:53:52 +0000 |
| Subject: | Re: pulling images from a database | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-9544@lists.php.net to get a copy of this message | ||
If you want to be efficient, store only the image metadata in the database
(path, filename, creator, date, dimentions, format, etc) in the database.
Keep the actual data as a file.
--
Regards,
Gary "SuperID" Huntress
=======================================================
FreeSQL.org offering free database hosting to developers
Visit http://www.freesql.org
""Trent Reimer"" <trentreimer@hotmail.com> wrote in message
news:9ebsd5$q0m$1@toye.p.sourceforge.net...
> I'm trying to find an efficient way to pull images from a database. What
I'm
> saying is that the actual image file itself is being stored as a Binary
> Large OBject in the database (MySQL) and that I want to use it on a web
> document.
>
> The only way I've been able to do it so far is to call an external script
> such as:
>
> <img src="grab_image.php?image=picture1.jpg">
>
> where "grab_image.php" goes and connects to the database and spits out the
> header information and then the binary data for the applicable picture.
>
> Is there a more efficient way to do this? Is there any way to embed the
> image information directly in the document without having to call an
> external script for each image?
>
>
>
> --
> 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
>