Hi am trying to go through a list of xml results and I am taking the id from these results and performing a query in my database to get more information. I have placed this into a foreach loop and then I have my while loop getting the mysql results. Everything works until I do the while loop. My page goes blank and I get no errors.. ANY help would be so appreciated! Here is my code:
foreach($data->HotelList->HotelSummary as $info):
$hotelId = $info->hotelId;
$title=$info->name;
?>
<!---------------------------------------------------------------------->
<!-----------------Listed hotel results div----------------------------->
<!---------------------------------------------------------------------->
<div class="listResults">
<div class="hotelListing">
<div class="hotelThumb">
<?php
//----------Getting thumb url from database by HotelId-------
$getImages = mysql_query("SELECT Caption FROM HotelImages WHERE ID = '4110'") or die(mysql_error());
while($r=$mysql_fetch_array($getImages)):
$img = $r['Caption'];
?>
<img src="" width="200" height="180" alt="test image" class="thumb" />
<?php endwhile; ?></div>
<?php endforeach; ?>
Just as a note, I have tried to get num_rows and I do get the correct result. SO the query is executing, but something is happening in the while loop.