Advanced search  


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.

Pages: [1]   Go Down

Author Topic: How to Delete an Empty User Album  (Read 4221 times)

0 Members and 1 Guest are viewing this topic.


  • Coppermine newbie
  • Offline Offline
  • Posts: 12
How to Delete an Empty User Album
« on: November 17, 2013, 12:55:24 pm »

I am sorry for starting a new thread, but I've been searching for the best part of an hour without getting a viable result...

I was trying to encourage people to upload their artwork to the gallery, so in my unlimited wisdom, I activated the 'everyone gets an album for signing up' and, lo and behold, the next hundred people to register just wanted to see things in high-rez... so there's a whole mess of albums with nothing in that I can't seem to find or delete as admin.

Would anyone be able to give me a 'because you is moron' guide to deleting these?
If there's some really-easy-to-do automated 'delete all teh empties' somewhere, I'd appreciate someone letting me know.

the gallery is (NOT SAFE FOR WORK)  :-[

Thanks for your help


  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15765
Re: How to Delete an Empty User Album
« Reply #1 on: November 21, 2013, 02:19:10 pm »

First of all, make a backup of your MySQL database!

Now, run this SQL query with a tool like phpMyAdmin to delete all empty albums:
Code: [Select]
DELETE FROM cpg15x_albums WHERE aid NOT IN (SELECT aid FROM cpg15x_pictures)(maybe you need to replace cpg15x_ with your actual database prefix).


  • Coppermine newbie
  • Offline Offline
  • Posts: 12
Re: How to Delete an Empty User Album
« Reply #2 on: December 01, 2013, 12:29:04 am »

AH! That did it!
I had to go to 'SQL' and not queries, but i managed to ape it :)

thank you very much for your help. Even a novice can follow it :)

For the record, if anyone else is following this, i had to run the command: DELETE FROM cpg_albums WHERE aid NOT IN (SELECT aid FROM cpg_pictures) from the SQL tab in phpMyAdmin from the admin area of my website host.

Thanks again Andre, I really appreciate it!
Pages: [1]   Go Up

Page created in 0.022 seconds with 20 queries.