Thanks for putting me on the right track.
I found a tutorial, but still do not quite understand the syntax to use. Modifying the query, it now looks like the below. I however get a 'Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/coralbay/www/www/allsearch/all.php on line 22' - Line 22 being $row=mysql_fetch_array($result);
<?
$query="select id, title, state, price, fname
FROM listings, images
join listing.id = images.listid";
$result=mysql_query($query);
$cols=4;
echo "<table>";
do{
echo "<tr>";
for($i=1;$i<=$cols;$i++){
$row=mysql_fetch_array($result);
if($row){
$img = $row['fname'];
?>
<td>
<table>
<tr valign="top">
<td><img src="images/<?=$img ?>" /></td>
<td>
<b><a href="http://www.coralbayrealestate.com/search/show.php?id=<?=$row['id'] ?> "> <?=$row['title'] ?> </a> </b><br />
<?=$row['state'] ?><br />
$USD <?=number_format ($row['price']) ?><br />
</td>
<td width="20"> </td>
</tr>
</table>
</td>
<?
}
else{
echo "<td> </td>";
}
}
} while($row);
echo "</table>";
?>
I have attached a couple of pdf's that show the structure. I tried to copy and paste it in to here, but it was beyond me...!
Thanks for you help
Sandydr
[attachment deleted by admin]