/ October 18, 2005

It’s bound to happen to most of us…
Your directory gets so many submissions that there is no way you can possibly go through all of them in a sufficient amount of time, and to top it all off, most of the pending links are spam. You’ve got to get control of your directory! 😯

The following SQL command will delete all pending links:

Code:
DELETE FROM `PLD_LINK` WHERE `STATUS` = 1;

First, BACK UP YOUR DATABASE!

If you want to remove a few at a time, do this:

Code:
DELETE FROM `PLD_LINK` WHERE `STATUS` = 1 LIMIT 50;

Or let’s suppose there is this one domain that spammed you to death:

Code:
DELETE FROM `PLD_LINK` WHERE `TITLE` LIKE ‘%poker%’ LIMIT 50;

Deletes all links where the Title contains the word “poker”

or…

Code:
DELETE FROM `PLD_LINK` WHERE WHERE `URL` LIKE ‘%poker%’ LIMIT 50;

Deletes all links where the URL contains the word “poker”

Ap0s7le: Only problem using

Code:
‘%poker%’

is that for example and ease of use I’m going to use “can”

So lets say I do

Code:
DELETE FROM `PLD_LINK` WHERE WHERE `URL` LIKE ‘%can%’ LIMIT 50;

That’s going to delete all titles that contain “scanner”, “cannot”, “can’t”, “canon” etc.

Be careful, as this could lead to unwanted deletions.

-Casey

__________________
Casey Wilson / Ap0s7le
Freelance Programmer
seothatworks: Hope not many people will be inspired by the first one.

It would be cool to have a mass approval/mass deletion tools on each page. I mean, instead of now going one by one, you would only check the checkboxes next to each link, and press the delete button or approval button only once per page. Nothing crucial, though.