Hi thanks for your help, but its not quite what I wanted.
It might be easier if i showed the code so you can see whats going on.
I got it working but it listed all the company's names and not just the one relevant to the article.
the first sql call is ok(this was done by someone no longer in the company) but its the $company_sql call im having difficulties with.
$sql = "select news.*, NewsImages.Name from news left join NewsImages on NewsImages.ID = news.ImageID where Status='A' and news.ID=$newsid";
$result = mysql_query($sql);
echo "<TABLE width=\"100%\">\n";
while ($newsdetails = mysql_fetch_array($result)) {
#$color = ($color == $altcolor1) ? $altcolor2 : $altcolor1;
echo "<TR valign=top bgcolor=\"$color\">\n";
echo " <TD><B><font size=4>" . $newsdetails["NewsHeadline"] . "</font></B><BR>";
echo "(" . date("d-M-y", $newsdetails["DatePosted"]) . ") ";
echo nl2br($newsdetails["NewsArticle"]) . "</TD>";
echo "<TD>";
if ($newsdetails["Name"] != "") echo "<IMG src=\"$BigImageDir" . $newsdetails["Name"] . "\">\n";
echo " </TD>";
echo "</TR>\n";
$company_sql = "select * from clients LEFT JOIN news ON clients.ID=news.client_ID";
$companyresult = mysql_query($company_sql);
while ($company = mysql_fetch_array($companyresult)) {
echo "Display more articles related to " . $company["company_name"] . "";
}
}