Question

Locked

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.

<?php
$db=mssql_connect("Server","user","pass");
$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;
mssql_close();
?>

This conversation is currently closed to new comments.

3 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Answers

Back to Networks Forum
3 total posts (Page 1 of 1)  

Related Discussions

Related Forums