Still having trouble accessing private albums... Still having trouble accessing private albums...
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

Still having trouble accessing private albums...

Started by iamcanadian, November 24, 2003, 05:29:50 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

iamcanadian

I upgraded to 1.2, but the following problems still persist:

When accessing private albums...

There was an error while processing a database query.

In debug mode ::

While executing query "SELECT user_id,
      username,
      COUNT(DISTINCT a.aid) as alb_count,
      COUNT(DISTINCT pid) as pic_count,
      MAX(pid) as thumb_pid
                FROM nuke_users AS u
                INNER JOIN cpg_usergroups AS g ON user_group_cp = group_id
                INNER JOIN cpg_albums AS a ON category = 10000 + user_id
                INNER JOIN cpg_pictures AS p ON p.aid = a.aid
                WHERE approved = 'YES'  GROUP BY user_id ORDER BY username "

mySQL error: Column: 'username' in field list is ambiguous


Also get this error when trying to view users in admin:

There was an error while processing a database query.

In debug mode:

While executing query "SELECT user_id, username, user_email, UNIX_TIMESTAMP(user_regdate) as user_regdate_cp, group_name, user_active_cp, COUNT(pid) as pic_count, ROUND(SUM(total_filesize)/1024) as disk_usage, group_quota FROM nuke_users AS u INNER JOIN cpg_usergroups AS g ON user_group_cp = group_id LEFT JOIN cpg_albums AS a ON category = 10000 + user_id LEFT JOIN cpg_pictures AS p ON p.aid = a.aid GROUP BY user_id ORDER BY user_regdate_cp DESC LIMIT 0, 25" on 0

mySQL error: Column: 'username' in field list is ambiguous




It's been several weeks now & no one seems to have a solution....

DJMaze

check in which tables the "username" field exists:
nuke_users
cpg_usergroups
cpg_albums
cpg_pictures

when it is in cpg_* then delete the field.

if not then change query into "SELECT u.user_id,
        u.username,
        COUNT(DISTINCT a.aid) as alb_count,
        COUNT(DISTINCT pid) as pic_count,
        MAX(pid) as thumb_pid
        FROM nuke_users AS u
        INNER JOIN cpg_usergroups AS g ON user_group_cp = group_id
        INNER JOIN cpg_albums AS a ON category = 10000 + user_id
        INNER JOIN cpg_pictures AS p ON p.aid = a.aid
        WHERE approved = 'YES'  GROUP BY u.user_id ORDER BY u.username"
There are 2 kinds of users in this world: satisfied and complainers.
Why do we never hear something from the satisfied users?
http://coppermine-gallery.net/forum/index.php?topic=24315.0

iamcanadian

THANK YOU SO MUCH!!! I deleted the username field from cpg_pictures and it works great now! :)