Resource id #4 Error
Posted: Mon Aug 22, 2005 9:41 am
Hi
I'm trying to access a binary image stored in a blob in mySQL, but get the error "Resource id #4 Error"
I'm trying to access a binary image stored in a blob in mySQL, but get the error "Resource id #4 Error"
Code: Select all
<?php
@require("scripts/connect.php");
$iid = $_REQUEST[iid];
$Query = mysql_query("Select image from image where image_id = $iid");
header("Content-type: image/jpeg");
$result = mysql_fetch_array($Query);
$image = $result["image"];
echo $image;
?>
[/quote]
Any help would be appreciated.