Welcome to Geeklog Tuesday, November 12 2019 @ 09:03 am EST

Geeklog Forums

admin/group.php SQL error w/MySQL 5

Status: offline


Forum User
Full Member
Registered: 08/02/04
Posts: 214
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

Status: offline


Site Admin
Registered: 12/01/02
Posts: 13073
Location:Stuttgart, Germany
Yeah, that's a known issue and already fixed in CVS.

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

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

bye, Dirk

Status: offline


Forum User
Full Member
Registered: 08/02/04
Posts: 214
Ah - the tracker's up!

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

At least the problem's now searchable in the forums

- Andy

All times are EST. The time is now 09:03 am.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content