pulling images from a database
| From: | Trent Reimer | Date: | Mon, 21 May 2001 22:06:53 +0000 |
| Subject: | pulling images from a database | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-9513@lists.php.net to get a copy of this message | ||
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?