mysql_select_db("photo");
$query="SELECT Photo,FileType FROM Photograph WHERE PhotoID=$id";
$result=mysql_query($query);
I use the following code to retrieve a BLOB from mySql and display it on a web page. Is this what you have in mind or maybe you could be more specific:
mysql_select_db("photo");
$query="SELECT Photo,FileType FROM Photograph WHERE PhotoID=$id";
$result=mysql_query($query);
$data=mysql_result($result,0,"Photo");
$type=mysql_result($result,0,"FileType");
Header("Content-type: $type");
print $data;