How to Delete an Empty User Album How to Delete an Empty User Album
 

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

How to Delete an Empty User Album

Started by zededd, November 17, 2013, 12:55:24 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

zededd

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 http://www.Zedslabs.com (NOT SAFE FOR WORK)  :-[

Thanks for your help

ΑndrĂ©

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:
DELETE FROM cpg15x_albums WHERE aid NOT IN (SELECT aid FROM cpg15x_pictures)
(maybe you need to replace cpg15x_ with your actual database prefix).

zededd

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!