Buddy list unknown problem/error!

Started on the old forum in June 2010 · view the original in the archive · old links redirect here

2 replies · 405 views · started 16 years ago · 1 min read

3 participants
l0rdrayven Developer · 83 posts #1

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...

//////////////////////////////////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_page= 5;
    $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&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&who=$item[2]&sid=$sid\">$item[1]</a>";
      echo "$lnk <a href=\"genproc.php?do=bud&who=$item[2]&sid=$sid&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&page=$ppage&sid=$sid&view=$view\">«Prev</a> ";
    }
    if($page<$num_pages)
    {
      $npage = $page+1;
      echo "<a href=\"lists.php?do=buds&page=$npage&sid=$sid&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&sid=$sid\">";
echo "Post Message</a><br/><br/>";
    echo "<a href=\"index.php?do=forums&sid=$sid\">Forums</a> <a href=\"index.php?do=chat&sid=$sid\">Chatrooms</a> <a href=\"index.php?do=main&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!

Not i rip persons off i will also do your arse !

something else Fellow · 2,296 posts #2

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

centi Developer · 159 posts #3

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

😳 .................................... http://photomag.lk/ .................................... 🤨

Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close