ok, after much trial and error if got this far:
<?
$result=mysql_query("SELECT * FROM MyTablw WHERE category = 'Album' ORDER BY id DESC LIMIT 1");
while($row=mysql_fetch_array($result)) {
if ($row['category']==Album){
print '
<!-- Start of : '.$row['title'].' : by : '.$row['reviewer'].' : -->
<table width="100%" height="100%" cellpadding="2" cellspacing="0" bgcolor="#FFFFFF">
<tr>
<td valign="top">
<img width="120" border=1 alt="'.$row['title'].'" src="'.$row['image'].'"><br>
<span class="reviewtitle">'.$row['title'].'</span><br>
'.substr($row['review'],0,200).'...
(<a href="showreview.php?id='.$row['id'].'">more</a>)<br>
'.$row['rating'].'<br></td>
</tr>
</table>
<!-- End of : '.$row['title'].' : by : '.$row['reviewer'].' : -->
';
}
else {
print 'There are no Album reviews yet.';
}
}
?>
This gets the latest entry depending on the category.
If there isnt an entry it appears to output nothing, even though ive put an else function in there.
can anyone see why my else function wouldnt be working?