for ($no=0; $no < $rows; $no++)
there's your problem, a FOR loop without {} backets.
That means it will execute the next statement only.
In your case, you use the do..while loop to fetch each record, and for every record, the FOR loop executes
$year = $GetDataArray["year"];
as many times are there are rows.
what PHP does looks like this:
do
{
for ($no=0; $no < $rows; $no++)
{
$year = $GetDataArray["year"];
};
$record = $GetDataArray["record"];
$name = $GetDataArray["name"];
A few sidenotes about your code in general:
DO...WHILE loops are evil because you always have to manually check wether the loop should be started at all.
mysql_num_rows() returns the number of records. If it is zero, you can stip printing the table. You don't need to use the 'expensive' mysql_fetch_array() to find out.
try this instead:
$rows = mysql_num_rows($GetData);
if ($rows>0)
{
for ($no = 0; $no<$rows; $no++)
{
$GetDataArray = mysql_fetch_array($GetData))
$year = $GetDataArray["year"];
$record = $GetDataArray["record"];
$name = $GetDataArray["name"];
$tpl->assign("NO", $no);
$tpl->assign("YEAR", $year);
$tpl->assign("RECORD", $record);
$tpl->assign("CONFERENCE", $name);
$tpl->parse (ROWS, ".rows");
};
$tpl->parse(DATA, "table");
$tpl->parse(TEST, "toplevel");
$tpl->FastPrint();
};
A forum, a FAQ, what else do you need?