April 23rd, 2012
SQL code to change all pending comments to spam:
UPDATE `wp_comments` SET `comment_approved`='spam' WHERE `comment_approved` = 0;
If you’re not using Akismet, and you’ve let your pending, most likely “spam” comments, pile-up; the above SQL code will help convert all pending comments to spam.
So comments like:
What an insightful idea has been written here. Truly sharing this will my friends website for trackback linkjuice ranking will be an amazing thank-you!!!
Will never see the light of day. ;)
Posted in Programming, Web | Comments Off
March 29th, 2012
Posted in Graphics, Marketing, Web | Comments Off
March 21st, 2012
preg_replace('@< (iframe|script|noscript)\b.*?>.*?@si', '', $string);
Removes iframe, script and noscript tags and contents from $string.
Performs an inverted version of strip_tags function.
Posted in Programming, Web | Comments Off
March 1st, 2012
Posted in Graphics | Comments Off
December 9th, 2011
DELETE n1 FROM table n1, table n2 WHERE n1.id > 10000 AND n1.id < 11000 AND n1.id > n2.id AND n1.EMAIL = n2.EMAIL;
The above MySQL query will delete duplicate email addresses between the id’s 10000 and 11000. Breaking the query into blocks of 1000 id’s will reduce strain the MySQL server.
Posted in Programming, Web | Comments Off