The table that I need to display information from is called:
full_size_product_image
It has the following fields:
product_image_id
product_id
image_file_name
product_image_location
Here is the code I am using to pull out the image_file_name and the product_image_location. This was all previously working fine but I had to make changes to the table - which was originally called colour_cards. I have made all the changes to the code as well - but can't get it to work again.
$sql = "SELECT image_file_name, product_image_location FROM full_size_product_image WHERE product_id LIKE '".$product_id."'";
// for testing we print the query
//echo "<p>".$sql."</p>";
$result = mysql_query($query);
$row = mysql_fetch_array($result);
$num_full_size_image_results = mysql_num_rows($result);
if ($num_full_size_image_results > 0)
{
echo"<h1>Full size product image</h1><p>";
$image_file_name = $row["image_file_name"];
echo"<p>".$image_file_name."</p>";
$product_image_location = $row["product_image_location"];
echo '<a href="'.$product_image_location.'">'.$image_file_name.'</a>';
echo"</p>";
}//endIF
Can anyone else see the problem?