I’ve never used blob before so this is all new to me but i have a column that is blob and stores the binary code for an image. How would i go abouts displaying the image?
@GenixdeaeauthorDec 17.2004 — #ok, i found away to display the images but i can't get it to work. the images were origonally inserted in msaccess, then i converted that db to mysql(it's got over 1400 items). when i try to display the image it says that the item can't be displayed because it contains errors. anyhelp is appricieated...here is the code[code=php]<?PHP //This is the page that grabs the img info require_once("includes.php"); if(isset($_GET["id"])) { $query = "SELECT * FROM $weapons WHERE ID = '". $_GET["id"] ."'"; $result = mysql_query($query, $dbconn); if(!mysql_num_rows($result)) { ?>There is no record for that id number.<?PHP }else{ while($get_img = mysql_fetch_assoc($result)) { header( "Content-type: image/jpg" ); echo $get_img["Image"]; } } }
?>
<?PHP //this is the page that displays it <img src="images2.php?id=<?PHP echo $_GET["id"]; ?>"> ?> [/code]and here is just a little bit of what is contained in the Image column[code=php]0x151c1d00030000000800010014001c00ffffffff50696374757265000001050000030000000400000044494200710400008ffbffff54160000280000002b0000002b00000001001800000000002c160000c40e0000c40e00000000000000000000000104090e[/code]it goes on w/ that for about 13500 characters