Is the data in the image field the EXACT binary representation of the JPEG, or is it a hexadecimal character encoded version? Also, you should inclde a Content-Length header entry with value resulting from strlen( $picture ) call.
bob
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
There is a problem.
With odbtp , the mssql image field that stores picture data, cannot show picture when retireved with php in a browser:
$query = 'SELECT picture FROM SHOPPERS_PICTURES WHERE SH_PIC_ID = '.(int)$_REQUEST{'id'};
$picture = db_getOne($query);
if (!$picture) {
die('id = ????');
}
header('Content-Type: image/jpeg');
echo $picture;
What could be the problem. The data was saved in hexa format.
Thanks
B
Is the data in the image field the EXACT binary representation of the JPEG, or is it a hexadecimal character encoded version? Also, you should inclde a Content-Length header entry with value resulting from strlen( $picture ) call.
Its the hexadecimal data of the image.
Bob, you are a genius! The content length solved the problem!!!!