autogroup and mysql5

You'll automatically gain access to this forum when you will post your first post in another forum. That way it will demonstrate how the Auto Group MOD works.
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 !

autogroup and mysql5

Postby Bicet on Thu 15. Dec, 2005 21:09

I've got some errors with this mod and mysql 5 here's an example:

Error geting users post stat

DEBUG MODE

SQL Error : 1054 Unknown column 'g.group_id' in 'on clause'

SELECT ug.user_id, g.group_id as g_id, u.user_posts, g.group_count, g.group_count_max FROM phpbb_groups g, phpbb_users u LEFT JOIN phpbb_user_group ug ON g.group_id=ug.group_id AND ug.user_id=2 WHERE u.user_id=2 AND g.group_single_user=0 AND g.group_count_enable=1 AND g.group_moderator<>2

Line : 570
File : functions_post.php



And this is the code on functions_post.php from line 562 to 571
Code: Select all
$sql = "SELECT ug.user_id, g.group_id as g_id, u.user_posts, g.group_count, g.group_count_max FROM " . GROUPS_TABLE . " g, ".USERS_TABLE." u
         LEFT JOIN ". USER_GROUP_TABLE." ug ON g.group_id=ug.group_id AND ug.user_id=$user_id
         WHERE u.user_id=$user_id
         AND g.group_single_user=0
         AND g.group_count_enable=1
         AND g.group_moderator<>$user_id";
   if ( !($result = $db->sql_query($sql)) )
   {
      message_die(GENERAL_ERROR, 'Error geting users post stat', '', __LINE__, __FILE__, $sql);
   }
Bicet
Poster
Poster
 
Posts: 4
Joined: Fri 15. Apr, 2005 07:49

Postby Jacky on Fri 16. Dec, 2005 10:14

Yes, I am also getting this error for MySQL 5. Any fix for it?
This signature is hacked by Jacky.
Jacky
Poster
Poster
 
Posts: 3
Joined: Fri 16. Dec, 2005 07:44

Postby Jacky on Fri 16. Dec, 2005 11:05

OK, found the solution.

IN THE CODE, FIND
Code: Select all
" . GROUPS_TABLE . " g, ".USERS_TABLE." u


REPLACE WITH
Code: Select all
(" . GROUPS_TABLE . " g, ".USERS_TABLE." u)


SAVE AND CLOSE.
This signature is hacked by Jacky.
Jacky
Poster
Poster
 
Posts: 3
Joined: Fri 16. Dec, 2005 07:44

Postby Bicet on Fri 16. Dec, 2005 16:24

Thnx a lot it works like a charm ;)
Bicet
Poster
Poster
 
Posts: 4
Joined: Fri 15. Apr, 2005 07:49

Postby Jacky on Fri 16. Dec, 2005 17:34

Bicet wrote:Thnx a lot it works like a charm ;)

Ah, one more thing.

Do the code changes to all files for this MOD. I am sure there are some other files which has the same code.
This signature is hacked by Jacky.
Jacky
Poster
Poster
 
Posts: 3
Joined: Fri 16. Dec, 2005 07:44

Postby Bicet on Fri 16. Dec, 2005 18:02

Yep I've done it for all files that has a similar query ;) Thnx again for the fast and reliable solution ;)
Bicet
Poster
Poster
 
Posts: 4
Joined: Fri 15. Apr, 2005 07:49


Return to Auto group [2.0.8/EM]

Who is online

Users browsing this forum: No registered users and 1 guest

cron