forum.coppermine-gallery.net
Support => cpg1.5.x Support => cpg1.5 permissions => Topic started by: zededd 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 http://www.Zedslabs.com (http://www.Zedslabs.com) (NOT SAFE FOR WORK) :-[
Thanks for your help
-
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).
-
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!