note 79032 added to function.mssql-query
| From: | sbaetz at soscs dot net | Date: | Wed, 07 Nov 2007 20:36:34 +0000 |
| Subject: | note 79032 added to function.mssql-query | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-132087@lists.php.net to get a copy of this message | ||
-- Phew -- I answered this myself...
The problem had NOTHING to do with mssql, or mysql for that matter.
For some reason when an image is held in a blob, and you want to display this within a browser, I
found I had to do the following.
I had to create a mini-php page, that looks essentially like the following psuedo code...
<?php # mini.php
$id = $_GET['id'];
$q = "select image from table where id = $id";
$image = mssql_query($q);
header("content-type image/jpeg");
echo($image);
?>
and then include this snippet within the core display page like this:
<html>
blah blah..
<img src='mini.php&id=<?php print $targetid; ?>'>
</html>
and BANG! it worked...
----
Server IP: 69.147.83.197
Probable Submitter: 75.67.234.125
----
Manual Page -- http://www.php.net/manual/en/function.mssql-query.php
Edit -- https://master.php.net/note/edit/79032
Del: integrated -- https://master.php.net/note/delete/79032/integrated
Del: useless -- https://master.php.net/note/delete/79032/useless
Del: bad code -- https://master.php.net/note/delete/79032/bad+code
Del: spam -- https://master.php.net/note/delete/79032/spam
Del: non-english -- https://master.php.net/note/delete/79032/non-english
Del: in docs -- https://master.php.net/note/delete/79032/in+docs
Del: other reasons-- https://master.php.net/note/delete/79032
Reject -- https://master.php.net/note/reject/79032
Search -- https://master.php.net/manage/user-notes.php