<?
$sql="select * from table";
$result=mysql_query($sql,$conn) or die ("can't connect to db");
//find the number of rows
$numrows=mysql_num_rows($result);
//finds the last word of data by taking the total number of rows-1
//and finding that record (-1 due to startof array at index (0) and
//moves the pointer to the last row
$msgrequired=mysql_data_seek($result,Numrows-1)
//get the data
$msg=mysql_fetch_row($result)
//write the data to the browser
echo $msg;
hth