View file wap/lpost2.php
<?php
$sql = "SELECT id, name FROM mx_topics ORDER BY
lastpost DESC LIMIT 0,1";
$items = mysql_query($sql);
echo mysql_error();
if(mysql_num_rows($items)>0)
{
while ($item = mysql_fetch_array($items))
{
$tlnm = htmlspecialchars($item[1]);
$nop = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM mx_posts WHERE tid='".$item[0]."'"));
$tpclnk = "<a
href=\"index.php?show=viewtpc&hits=$hits&tid=$item[0]&go=last\">$tlnm($nop[0])</a>";
echo "$tpclnk<br/>";
}
}
?>