Subject: admin/group.php SQL error w/MySQL 5

Posted on: 09/07/06 11:31am
By: asmaloney

I was involuntarily 'upgraded' to MySQL 5.0.22. Now when I go to admin/group.php [GL 1.4] and click to list a group's members, I get the following MySQL error:

1054: Unknown column 'gl_users.uid' in 'on clause'. SQL in question: SELECT DISTINCT gl_users.uid,username,fullname,email,photo,status,regdate,lastlogin FROM gl_users,gl_group_assignments LEFT JOIN gl_userinfo ON gl_users.uid=gl_userinfo.uid WHERE gl_users.uid > 1 AND gl_users.uid = gl_group_assignments.ug_uid AND (gl_group_assignments.ug_main_grp_id IN (9,11,1)) ORDER BY username asc ;

I suspect it's a problem with MySQL 5, but I have no experience at all with it. Does anyone with some inkling as to the differences between MySQL 4 and MySQL 5 see the problem?

Alternatively, could someone using MySQL 5 verify that this is a problem for them too?

[And yes, gl_users.uid exists. Don't think anything would work if it didn't...]

Thanks for any help!

- Andy

admin/group.php SQL error w/MySQL 5

Posted on: 09/07/06 11:42am
By: Dirk

Yeah, that's a known issue and already fixed in CVS.

Simply switch the two tables names after the FROM, i.e.
FROM {$_TABLES['group_assignments']},{$_TABLES['users']}

That's one of the odd changes in MySQL 5 ...

bye, Dirk

admin/group.php SQL error w/MySQL 5

Posted on: 09/07/06 11:48am
By: asmaloney

Ah - the tracker's up!

Thanks Dirk - that did the trick... Strange one.

At least the problem's now searchable in the forums

- Andy

Geeklog - Forum
https://www.geeklog.net/forum/viewtopic.php?showtopic=68249