hello
this is my last post code.i am getting some problem with it.
suppose a member of my site john has posted a reply in a topic.and if a staff of my site deletes johns reply then it should also get deleted from last post code as above.
but last post still shows johns topic name and "by" shows name of person who posted last in forums, before my staff deleted johns post from that topic.
what is problem in it? it shows me wrong last post even when a staff deleted post of john? looks like poster name code is fine but the problem is with last forum post code. what is mistake here?
PHP Code:
$lpt = mysql_fetch_array(mysql_query("SELECT id, name FROM ibwf_topics ORDER BY
lastpost DESC LIMIT 1"));
$nops = mysql_fetch_array(mysql_query("SELECT COUNT(id) FROM ibwf_posts WHERE tid = '".$lpt[0]."'"));
if($nops[0]==0)
{
$pinfo = mysql_fetch_array(mysql_query("SELECT authorid FROM ibwf_topics WHERE id = '".$lpt[0]."'"));
$tluid = $pinfo[0];
}else{
$pinfo = mysql_fetch_array(mysql_query("SELECT uid FROM ibwf_posts ORDER BY dtpost
DESC LIMIT 1"));
$tluid = $pinfo[0];
}
$tlnm = htmlspecialchars($lpt[1]);
$tlnick = getnick_uid($tluid);
$tpclnk = "<a
href="index.php?action=viewtpc&tid=$lpt[0]&go=last&sid=$sid">$tlnm</a>";
$vulnk = "<a
href="index.php?action=viewuser&who=$tluid&sid=$sid">$tlnick</a>";
echo "<div><center><b>Last Post: $tpclnk, BY: $vulnk</b><br/></center></div>";
this is my last post code.i am getting some problem with it.
suppose a member of my site john has posted a reply in a topic.and if a staff of my site deletes johns reply then it should also get deleted from last post code as above.
but last post still shows johns topic name and "by" shows name of person who posted last in forums, before my staff deleted johns post from that topic.
what is problem in it? it shows me wrong last post even when a staff deleted post of john? looks like poster name code is fine but the problem is with last forum post code. what is mistake here?
Comment