which ORDER BY u.username

This mod is a fix for original phpbb2, it works when you look up a large usergroup, here on mods.db9.dk without this mod it takes +30 sek to look up the group "everyone" details. after this mod is applyed it takes approx 1 sek

Moderator: Moderators

Forum rules
The content in this forum is dated Dec. 21 2005 and can be used as Archive only. This Forum is LOCKED and READ ONLY !

which ORDER BY u.username

Postby wesdeer on Tue 24. Feb, 2004 01:30

in my groupcp.php there are two
which one do i edit

Code: Select all
   //
   // Get user information for this group
   //
   $sql = "SELECT u.username, u.user_id, u.user_viewemail, u.user_posts, u.user_regdate, u.user_from, u.user_website, u.user_email, u.user_icq, u.user_aim, u.user_yim, u.user_msnm, ug.user_pending
      FROM " . USERS_TABLE . " u, " . USER_GROUP_TABLE . " ug
      WHERE ug.group_id = $group_id
         AND u.user_id = ug.user_id
         AND ug.user_pending = 0
         AND ug.user_id <> " . $group_moderator['user_id'] . "
      ORDER BY u.username";
   if ( !($result = $db->sql_query($sql)) )
   {
      message_die(GENERAL_ERROR, 'Error getting user list for group', '', __LINE__, __FILE__, $sql);
   }

   $group_members = $db->sql_fetchrowset($result);
   $members_count = count($group_members);
   $db->sql_freeresult($result);

   $sql = "SELECT u.username, u.user_id, u.user_viewemail, u.user_posts, u.user_regdate, u.user_from, u.user_website, u.user_email, u.user_icq, u.user_aim, u.user_yim, u.user_msnm
      FROM " . GROUPS_TABLE . " g, " . USER_GROUP_TABLE . " ug, " . USERS_TABLE . " u
      WHERE ug.group_id = $group_id
         AND g.group_id = ug.group_id
         AND ug.user_pending = 1
         AND u.user_id = ug.user_id
      ORDER BY u.username";
   if ( !($result = $db->sql_query($sql)) )
   {
      message_die(GENERAL_ERROR, 'Error getting user pending information', '', __LINE__, __FILE__, $sql);
   }
wesdeer
 

Postby Niels on Mon 01. Mar, 2004 23:16

the how-to explain how to modify the file in cronological order.

this means, that after you have modifyed a line (added,replaced or what ever) you should continue for the next [FIND] tag.
the fist code, with fits the find tag is the one you should use the how-to on.

in your example both lines of will be modifyed equally, as later on in the how-to you are requested to find the next
Code: Select all
ORDER BY u.username
and modify the same way.

please note, a new version (1.1.1.) have resently been released, so you should use this instead
(if a how-to is EM ready, it will mostly be bullet prof, since a machine is more picky than a human. :D)
User avatar
Niels
Poster
Poster
 
Posts: 4390
Joined: Sat 27. Jul, 2002 15:46


Return to Large groups fix [2.0.8/EM]

Who is online

Users browsing this forum: No registered users and 0 guests

cron