$rs_textsms = mysql_query("SELECT * FROM $tr_textsms INNER JOIN $tr_username ON $tr_textsms.username = $tr_username.username order by $tr_textsms.id DESC Limit 0,10 "); //your sql order by id DESC Limit 0,10
$box_textsms = array(); //just an empty array
while ($row = mysql_fetch_assoc($rs_textsms))
{
$box_textsms []= $row;
$time_fn=time()-strtotime("2012-10-19 0:38:48");
$time_generate_fn=generate_date_today("d M Y H:i", (time()-$time_fn), "th", true);
}
$smarty->assign("box_textsms",$box_textsms);