My code:
Code: Select all
require "config.php";
// more code here
$sql = "SELECT *
FROM `livestock_photos`
WHERE parent_id = '".mysql_real_escape_string($row['id'])."'";
if($debug == TRUE)
echo '<p>DEBUG3: '.$sql.'</p>';
$result2 = mysql_query($sql)
or die ('Could not query because: ' . mysql_error());
while ($row2 = mysql_fetch_assoc($result2))
{
echo '<strong>'.$row2['title'].'</strong><br />';
echo $row2['description']."<br />";
echo '<a href="javascript:void(0)" onClick="popWin(\''.$images_location_large.$row2['filename'].'.htm\', \'\', \''.$popup_width.'\', \''.$popup_height.'\')"><img src="'.$images_location.$row2['photos'].'" border="0" /></a> ';
}
// more code here
Title1
Description1
Photo1 Photo2 Photo3
Title2
Description2
Photo1 Photo2 Photo3