I fail to see why he should use mysql_data_seek, he should just eliminate that line of code properly
$sql2="SELECT * FROM preturi WHERE id_h=$idhh AND tip_cam LIKE '$tip_c[$i]'";
$rez2=mysql_query($sql2);
//instead of this -- $row2=mysql_fetch_assoc($rez2);
if (mysql_num_rows($rez2) > 0) //check for more than 0 results
//header tabel
//this becomes obsolete -- if($row2['per']!="")
{ echo "<b><font color=#DC143C size=2>".$tip_c[$i]."</font>";
echo "<table border=1 class=tab>";
echo "<tr><th>Perioada</th>";
}
.............
while($row2=mysql_fetch_assoc($rez2)) //do your normal loop and you no longer miss the 1st row ;)
{
echo "<tr>";
echo "<td><center>".$row2['per']." "."</td>";
if($row2['sng']!="")
{
echo "<td><center>".$row2['sng']." ".$row2['moneda']."</td>";
}
.........
}
and if your concern isnt 0 results but " " columns, then you should negate them in the query so you never recieve them