I've adapted my query further which now pulls out all the right results, but only displays the first image associated with the property record
SELECT prop_details.prop_id, prop_details.prop_ref, prop_details.short_desc, prop_images.img_thumb, prop_images.prop_id, prop_details.long_desc
FROM prop_details LEFT JOIN prop_images ON prop_details.prop_id=prop_images.prop_id
GROUP BY prop_images.prop_id, prop_details.prop_id
ORDER BY prop_details.prop_ref
Can anyone guide me as to how to adapt my PHP block to acheive this?
This is what I've got so far
<body>
<table width="80%" border="0" cellspacing="2" cellpadding="2">
<tr>
<td>Prop ID From Ims Table</td>
<td>Prop ID from Deatils table</td>
<td>Office Ref</td>
<td>Short Desc</td>
<td>Long Desc</td>
<td>Thumbs</td>
</tr>
<?php do { ?>
<tr>
<td align="left" valign="top"><?php echo $row_Recordset1['prop_id']; ?></td>
<td align="left" valign="top"><?php echo $row_Recordset1['prop_id']; ?></td>
<td align="left" valign="top"><?php echo $row_Recordset1['prop_ref']; ?></td>
<td align="left" valign="top"><?php echo $row_Recordset1['short_desc']; ?></td>
<td align="left" valign="top"><?php echo $row_Recordset1['long_desc']; ?></td>
<td align="left" valign="top"><img src="../images/tns/<?php echo $row_Recordset1['img_thumb']; ?>" width="50" height="50" alt="" /></td>
</tr>
<?php } while ($row_Recordset1 = mysql_fetch_assoc($Recordset1)); ?>
</table>
</body>
</html>
<?php
mysql_free_result($Recordset1);
?>
With thanks as ever
Phil