hi,anybody can help me by giving this code?thanks
Need last 10 posts code for lavalair
Collapse
X
-
Originally posted by arman View Posthi,anybody can help me by giving this code?thanksMy 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
Comment
-
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 "<p>";
$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&am p;tid=$item[2]&go=last\">$a</a>";
$d = "<ahref=\"index.php?action=viewuser&sid=$sid&a mp;who=$item[1]\">$b</a>";
echo "<small>$c <b>By:</b> $d</small><br/>";}.i try it.it work in index page.Last edited by arman; 29.08.09, 20:32.
Comment
-
Originally posted by arman View Postno,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 "<p>";
$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&am p;tid=$item[2]&go=last\">$a</a>";
$d = "<ahref=\"index.php?action=viewuser&sid=$sid&a mp;who=$item[1]\">$b</a>";
echo "<small>$c <b>By:</b> $d</small><br/>";
}
is anything need to add in table?i try it.it work in index page but show all 10 posts in index.Last edited by kiLLeR-eyEd_14; 29.08.09, 15:11.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
Comment
Comment