top poster/chatter

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

    top poster/chatter

    Code:
    $sql2 =mysql_fetch_array(mysql_query("SELECT id, username, chmsgs FROM users ORDER BY chmsgs DESC LIMIT 1"));
    $unick = getnick_uid($sql2[0]);
    $main.="Top PM Chatter :<a href=\"profile.php?action=viewuser&amp;who=$sql2[0]&amp;sid=$sid\">$unick</a><br/>";
    $sql2 =mysql_fetch_array(mysql_query("SELECT id, username, posts FROM users ORDER BY posts DESC LIMIT 1"));
    $unick = getnick_uid($sql2[0]);
    $main.="Top Forum Poster :<a href=\"profile.php?action=viewuser&amp;who=$sql2[0]&amp;sid=$sid\">$unick</a><br/>";
    whats wrong with this
    Last edited by brand; 11.10.11, 17:59.
    HELP THEM WHO HELPS YOU



    i only work on wapdesire v_2 coding only

    #2
    PHP Code:
    $unick $sql2[id];
    $username $sql2[username]; 

    Comment


      #3
      No loop .....
      PHP Code:
      $sql2 mysql_query("SELECT id, username, chmsgs FROM users ORDER BY chmsgs DESC LIMIT 1");
      while(
      $row mysql_fetch_array($sql2))
      {
      $unick getnick_uid($row[0]);

      or you can use:
      PHP Code:
      $sql2 =mysql_fetch_array(mysql_query("SELECT id, username, MAX(chmsgs) FROM users")); 

      Comment

      Working...
      X