Buddy list unknown problem/error!

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

    Buddy list unknown problem/error!

    Guys i encounter this problem in my buddy list.It appears suddenly even though i didnt change/edit the script. Heres the error message by sql...


    The SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET SQL_MAX_JOIN_SIZE# if the SELECT is okay


    And heres my buddy list codes...


    PHP Code:

    //////////////////////////////////Buddies

    else if($do=="buds")
    {
      echo 
    "<head>";
      echo 
    "<title>My Friends</title>";
      echo 
    "<link rel=\"stylesheet\" type=\"text/css\" href=\"$theme\"/>";
      echo 
    "</head>";
        
    addonline(getuid_sid($sid),"Viewing Friends List","");
        
    $uid getuid_sid($sid);
        echo 
    "<div align=\"center\"><div class=\"head\">My Friends</div><br/>";
        echo 
    "Your Current Message<br/>";
        echo 
    parsemsg(getbudmsg($uid), $sid);

        echo 
    "</div><hr/>";
        
    //////ALL LISTS SCRIPT <<

        
    if($page=="" || $page<=0)$page=1;
        
    $num_items getnbuds($uid); //changable
        
    $items_per_page5;
        
    $num_pages ceil($num_items/$items_per_page);
        if((
    $page>$num_pages)&&$page!=1)$page$num_pages;
        
    $limit_start = ($page-1)*$items_per_page;

        
    //changable sql
    /*
    $sql = "SELECT
                a.name, b.place, b.userid FROM ibwf_users a
                INNER JOIN ibwf_online b ON a.id = b.userid
                GROUP BY 1,2
                LIMIT $limit_start, $items_per_page
        ";
    */
            
    $sql "SELECT a.lastact, a.name, a.id, b.uid, b.tid, b.reqdt FROM ibwf_users a INNER JOIN ibwf_buddies b ON (a.id = b.uid) OR (a.id=b.tid) WHERE (b.uid='".$uid."' OR b.tid='".$uid."') AND b.agreed='1' AND a.id!='".$uid."' GROUP BY 1,2  ORDER BY a.lastact DESC LIMIT $limit_start$items_per_page";


        echo 
    "<div align=\"left\">";
        
    $items mysql_query($sql);
        echo 
    mysql_error();
        if(
    mysql_num_rows($items)>0)
        {
        while (
    $item mysql_fetch_array($items))
        {
       
    $user $item[2];
       
    $avlink mysql_fetch_array(mysql_query("SELECT pix FROM ibwf_users WHERE id='".$user."'"));
       
    $img $avlink[0];

        echo 
    "<img src=\"avatars.php?src=$img&amp;id=$user\" alt=\"avatar\"/><br/>";
              if(
    isonline($item[2]))
      {
        
    $iml "(Online)";
        
    $uact "Where: ";
        
    $plc mysql_fetch_array(mysql_query("SELECT where FROM ibwf_online WHERE userid='".$item[2]."'"));
        
    $uact .= $plc[0];
      }else{
        
    $iml "(Offline)";
        
    $uact "Last Active: ";
        
    $ladt date("d m y-H:i:s"$item[0]);
        
    $uact .= $ladt;
      }
          
    $lnk "$iml <a href=\"index.php?do=viewuser&amp;who=$item[2]&amp;sid=$sid\">$item[1]</a>";
          echo 
    "$lnk <a href=\"genproc.php?do=bud&amp;who=$item[2]&amp;sid=$sid&amp;todo=del\">[unfriend]</a><br/>";
          
    $bs date("d m y-H:i:s",$item[5]);
          echo 
    "Friend Since:$bs<br/>";
          echo 
    "$uact<br/>";
          echo 
    "Message: ";
          
    $bmsg parsemsg(getbudmsg($item[2]), $sid);
          echo 
    "$bmsg<br/>";
          echo 
    "<br/>";

        }
        }
        echo 
    "</div>";
        echo 
    "<div align=\"center\">";
        if(
    $page>1)
        {
          
    $ppage $page-1;
          echo 
    "<a href=\"lists.php?do=buds&amp;page=$ppage&amp;sid=$sid&amp;view=$view\">«Prev</a> ";
        }
        if(
    $page<$num_pages)
        {
          
    $npage $page+1;
          echo 
    "<a href=\"lists.php?do=buds&amp;page=$npage&amp;sid=$sid&amp;view=$view\">Next»</a>";
        }
        echo 
    "<br/>$page of $num_pages<br/>";
        if(
    $num_pages>2)
        {
                     
    $rets "<form action=\"lists.php\" method=\"get\">";
            
    $rets .= "Go To Page:<input name=\"page\" style=\"-wap-input-format: '*N'\" size=\"2\"/>";
            
    $rets .= "<input type=\"submit\" value=\"Go\"/>";
            
    $rets .= "<input type=\"hidden\" name=\"do\" value=\"$do\"/>";
            
    $rets .= "<input type=\"hidden\" name=\"sid\" value=\"$sid\"/>";

            
    $rets .= "</form>";

            echo 
    $rets;

        }
      
    ////// UNTILL HERE >>
        
    echo "<a href=\"index.php?do=chbmsg&amp;sid=$sid\">";
    echo 
    "Post Message</a><br/><br/>";
        echo 
    "<a href=\"index.php?do=forums&amp;sid=$sid\">Forums</a> <a href=\"index.php?do=chat&amp;sid=$sid\">Chatrooms</a> <a href=\"index.php?do=main&amp;sid=$sid\">";
    echo 
    "Home</a>";
        echo 
    "<div class=\"foot\">$mysite</div>";
     echo 
    "<br/>Page Took ";
     
    $load microtime();
     print (
    number_format($load,2));
     echo 
    " Seconds";
     echo 
    "</div></body>";
    }

    //////////////////////////////////Buddies 
    Please anyone can fix this out.? i already check may database/sql and i found no errors or problems...Please help me to solve this,thanks in advance!

    #2
    Sounds like you have turned up max buddies up to much lol

    Comment


      #3
      yep some old ver's hv tat problem.... too many rows


      ....................................
      http://photomag.lk/
      ....................................

      Comment

      Working...
      X