note 79032 deleted from function.mssql-query by cmb

From: Date: Sun, 23 Jun 2019 14:18:00 +0000
Subject: note 79032 deleted from function.mssql-query by cmb
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-211358@lists.php.net to get a copy of this message
Note Submitter: sbaetz at soscs dot net ---- -- 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...

« previous php.notes (#211358) next »