Blob does not display multiple images from mysql database
Posted: Tue Jul 29, 2008 12:29 am
Pls help this is urgent!
<?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];
}
?>
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];
}
?>
<?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];
}
?>
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];
}
?>