Need last 10 posts code for lavalair

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Need last 10 posts code for lavalair

    hi,anybody can help me by giving this code?thanks

    #2
    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

    Comment


      #3
      Originally posted by arman View Post
      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

      Comment


        #4
        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&amp;sid=$sid&am p;tid=$item[2]&amp;go=last\">$a</a>";
        $d = "<ahref=\"index.php?action=viewuser&amp;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


          #5
          Everythink is good in this script.
          OR JUST SEND PM

          Comment


            #6
            Originally posted by arman View Post
            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 "<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&amp;sid=$sid&am p;tid=$item[2]&amp;go=last\">$a</a>";
            $d = "<ahref=\"index.php?action=viewuser&amp;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.
            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..
            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

            Working...
            X