Hi - I've searched not only here but all over the web. All I need is the SQL to bulk delete albums from my MySql database. I have like 2000 of them that spammers put in and the multiple delete button only shows 15 at a time.
BTW, I do have many years of experience with MySql, so I'll know what I'm doing.
Can someone help?
Posts: 4342
It would be quicker to change the multiple delete page to show more items. You're not recommended to muck about in the database; it's pretty complex.
Posts: 6
I would love to do that. Where is that setting?
Posts: 4342
Probably in the relevant template file.
Posts: 6
No idea where this would be. Can you help?
Posts: 4342
Actually no - try line 172 of modules\core\itemDelete.inc:
Posts: 16504
I don't know. I believe you're using an older version of G2 that still allowed you to delete multiple albums. The most recent versions 2.3 and 2.3.1 do not allow that as it's very resource intensive. IIRC that was my conversation with Bharat when I asked about it when I noticed that option was gone.
I'd dig around in /modules/core/templates
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here
Posts: 6
You're awesome, will try this.
Posts: 16504
um, just ignore my post
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here
Posts: 6
I don't care if it's intensive - there are not that many users. But I appreciate the concern.
Posts: 4342
...which was (I have no doubt) actually referring to the forthcoming (but Ultra Ultra Secret) Gallery 2.4 release :-D ... since my 2.3 has no problem deleting multiple albums - although, yes, it does take an age (and doesn't have a progress bar either).
Posts: 4342
I've also just recalled why deleting items by hitting the db is a bad idea, and why nobody can give you a safe SQL statement for that purpose: individual modules have their own tables that reference GalleryItems and install event hooks so that they are notified to run their own code to tidy up during the item (or album) deletion process. So the db changes can depend on what modules you have installed.
Besides which, deleting a photo is 6 table join, even without additional modules.
Posts: 6
Spoke too soon. Cache hadn't cleared.
Thx