Forum Moderators: coopster
this code displays all the painting ids available in the table 'gallery'.
but the below coding doesnt display all the corresponding images(of blob type).
Please tell em why.thanks in advance!
<?php
header('Content-Type: image/jpeg');
//header('Content-Type: text/html');
@mysql_connect("localhost","root","dba") or die("Error");
@mysql_select_db("gallery");
$result = mysql_query("SELECT * FROM paintings");
while($row = mysql_fetch_assoc($result)){
//print $row[p_painting_id]."</br>";
print $row[p_painting_image];
}
?>
I don't think it will work that way for multiple images, off the top of my head, but it may for a single one
this thread may hold some answers
How to convert image blob files back to image [webmasterworld.com]