Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: [1]   Go Down

Author Topic: Still having trouble accessing private albums...  (Read 3115 times)

0 Members and 1 Guest are viewing this topic.

iamcanadian

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 22
Still having trouble accessing private albums...
« on: November 24, 2003, 05:29:50 pm »

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 ::

Code: [Select]
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:

Code: [Select]
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....
Logged

DJMaze

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Posts: 831
    • Dragonfly CMS
Still having trouble accessing private albums...
« Reply #1 on: November 24, 2003, 06:40:43 pm »

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
Code: [Select]
"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"
Logged
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

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 22
Still having trouble accessing private albums...
« Reply #2 on: November 25, 2003, 05:31:51 pm »

THANK YOU SO MUCH!!! I deleted the username field from cpg_pictures and it works great now! :)
Logged
Pages: [1]   Go Up
 

Page created in 0.021 seconds with 19 queries.