I have a little problem. I am getting an extra empty cell at the end of my database output.
$sql ="SELECT products.model_price, products.berth, products.tn_pic, products.pic, products.model_name, manufacturers.manu_name FROM products, manufacturers where products.manufacturer_id = 1 AND manufacturers.manufacturer_id=1";
$result= mysql_query($sql,$conn);
$row = mysql_fetch_array($result);
$num_results = mysql_num_rows($result);
for($i=0;$i<$num_results;$i++)
{
$row = mysql_fetch_array($result);
if(($i%2)==0)
echo '<tr valign=top>';
echo '<td colspan=2><a href="pic.php?pic='.$row['pic'].' alt='.$row['model_name'].'&berth='.$row['berth'].'">';
echo '<img src="'.$row['tn_pic'].'" alt="'.$row['model_name'].'" class="frame" border="0"></a><td align="center" class="frame" ><span class=smalltext>Model '.$row['model_name'].' <BR><BR> '.$row['model_price'].' </span></td>';
if(($i%2)==2)
echo '</tr>';
}
?>
Any ideas? I have checked the database and there are no empty records.
Thanks in advance