Need last 10 posts code for lavalair
Started on the old forum in August 2009 · view the original in the archive · old links redirect here
if u search ull find it here
Jacques jacques@gw-designs.co.za http://coding.biz.tm Come join and lets make it a place to learn all the noobies how to code
NEVER FORGET TO CLICK THE TANX BUTTON IF U LIKE WHAT IM SHARING OR HELPING WITH
arman wrote: hi,anybody can help me by giving this code?thanks
do u mean latest forum topics?it's already posted here..just use search..
My Blog: http://jhommark.blogspot.com My Facebook: http://www.facebook.com/jhommark My Official Site: http://www.undergroundweb.tk My Community Site: http://undergroundwap.xtreemhost.com
no,this is for last 10 posts.
$sql = "SELECT a.name, b.uid, b.tid FROM ibwf_topics a INNER JOIN ibwf_posts b ON a.id = b.tid ORDER BY b.id DESC LIMIT 0 , 10"; echo " "; $items = mysql_query($sql); echo mysql_error(); while ($item = mysql_fetch_array($items)) { $a = htmlspecialchars($item[0]); $b = getnick_uid($item[1]); $c = "<ahref="index.php?action=viewtpc&sid=$sid&tid=$item[2]&go=last">$a</a>"; $d = "<ahref="index.php?action=viewuser&sid=$sid&who=$item[1]">$b</a>"; echo "$c By: $d ";}.i try it.it work in index page.
Coding Life :)
arman wrote: no,this is for last 10 posts.i have this code but n't working.
$sql = "SELECT a.name, b.uid, b.tid FROM ibwf_topics a INNER JOIN ibwf_posts b ON a.id = b.tid ORDER BY b.id DESC LIMIT 0 , 10"; echo " "; $items = mysql_query($sql); echo mysql_error(); while ($item = mysql_fetch_array($items)) { $a = htmlspecialchars($item[0]); $b = getnick_uid($item[1]); $c = "<ahref="index.php?action=viewtpc&sid=$sid&tid=$item[2]&go=last">$a</a>"; $d = "<ahref="index.php?action=viewuser&sid=$sid&who=$item[1]">$b</a>"; echo "$c By: $d "; }
is anything need to add in table?i try it.it work in index page but show all 10 posts in index.
the post is already in the topic..so you'll still view the topic..it's also the same as latest forum topics..And in ur script posted, why order by id?it should be order by lastpost..
My Blog: http://jhommark.blogspot.com My Facebook: http://www.facebook.com/jhommark My Official Site: http://www.undergroundweb.tk My Community Site: http://undergroundwap.xtreemhost.com