Displaying images
Posted: Wed Jun 07, 2006 2:15 am
Hi
I`m trying to pull from a database a list of images for a reference number, i.e.
reference acbd has 6 images stored
image1
image2
image3
image4
etc
how can i pull these from the database and use them?
I have created this to pull them:
etc
but its not working, any ideas to where i`m going wrong?
I`m trying to pull from a database a list of images for a reference number, i.e.
reference acbd has 6 images stored
image1
image2
image3
image4
etc
how can i pull these from the database and use them?
I have created this to pull them:
Code: Select all
$result1=MYSQL_QUERY( "SELECT * FROM $table WHERE reference ='$ID' ");
if(mysql_num_rows($result1)) {
while($row = mysql_fetch_row($result1))
{
$picture[$i] = $row["1"];
$i++;
} }
$image1 = $picture[1];
$image2= $picture[2];but its not working, any ideas to where i`m going wrong?