Having a Issue with MS SQL PHP viewing images

By Larson ·
I have a MS SQL 2005 database that holds images in it. When my php script runs it displays part of the image but it stops before finishing it. This is my code.

$d=mssql_select_db("Database", $db);
$sql = "SELECT Image1 FROM ItemInformation WHERE ITEMNMBR='Pho0001'";
$res = mssql_query($sql);
$row = mssql_fetch_array($res);
$data = $row['Image1'];
header("Content-Type: image/jpg");
echo $data;

This conversation is currently closed to new comments.

Thread display: Collapse - | Expand +

All Answers

Related Discussions

Related Forums