Thanks Guys for your help, But I have sorted it out after smacking my head against the monitor for a minutes before passing out.
If you recall, the problem I had based on the fact that the mysql_fetch_array seemed to have missed the first row in my sql statement.
Basically, I cheated a bit by running the mysql_fetch_array before the loop and outputing the first line, then in a while re-running the mysql_fetch_array which outputted the data from the second row onwards in the SQL statement.
$result = mysql_query($query);
$rows = mysql_num_rows (mysql_query($query));
if (!$record_test = mysql_fetch_array($result)) {
echo ("<table> <tr> <td width=100 /> <td><font color=red size=5> No Records
Present</font></td></tr></table>");
echo ("<BR>Record = $record_test");
}else {
echo "<table>\n";
$row_number = 1;
printf("<tr><td width=100></td>
<td width= 200 align=center>%s</td>
<td width= 200 align=center>%s</td>
<td width= 50></td>
<td width= 200 align=left>%s %s %s</td>
<td width= 100 align=center>s</td></tr>\n",
$row_number, $record_test[name], $record_test[day], $record_test[month],
$record_test[year], $record_test[sex]);
while ($record = mysql_fetch_array($result))
{
$row_number = $row_number + 1;
printf("<tr><td width=100></td>
<td width= 200 align=center>%s</td>
<td width= 200 align=center>%s</td>
<td width= 50 />
<td width= 200 align=left>%s %s %s</td>
<td width= 100 align=center>%s</td></tr>\n",
$row_number, $record[name], $record[day], $record[month], $record[year], $record[sex]);
}
echo "</table>\n";
If anyone has any better thought/ideas about doing this, please let me know.
Many Thanks For Your Help.
Fuzz