mitch247
Forum Replies Created
-
Thanks for a great plugin… I am having issues with the new changes. I tried your development version and the error messages went away, however I still get the error:
Problem retrieving data from Twitter
Please check the Twitter name used in the settings.Forum: Fixing WordPress
In reply to: Mass delete unpopular TagsOK I did run it successfully… I moved to my next domain and tried to do the same thing. However I get this error when I try to create that temp table:
import.php: Missing parameter: import_type (FAQ 2.8)
import.php: Missing parameter: format (FAQ 2.8)Have you ever seen this?
Forum: Fixing WordPress
In reply to: Mass delete unpopular Tagsvtxyzzy… Thanks a lot for that updated code… I ran the following and still show thousands of tags in my dashboard.
CREATE TABLE temprel SELECT tr.term_taxonomy_id, count(1) AS postcount FROM wp_term_relationships tr JOIN wp_term_taxonomy tt ON (tr.term_taxonomy_id = tt.term_taxonomy_id) WHERE tt.taxonomy = 'post_tag' GROUP BY tr.term_taxonomy_id HAVING postcount < 5and
DELETE FROM wp_term_relationships WHERE term_taxonomy_id IN (SELECT term_taxonomy_id FROM temprel)It seems that that did work at the post level. However I still see thousands in admin. How can I use that new temporary table to clear out the tags in admin as well?
Thanks again for your help!Forum: Fixing WordPress
In reply to: Mass delete unpopular TagsSo I should do this:
CREATE TABLE temprel SELECT term_taxonomy_id, count(1) as postcount FROM <code>bmc_term_relationships</code> GROUP BY term_taxonomy_id HAVING count(1) < 5and then:
DELETE FROM wp_term_relationships WHERE term_taxonomy_id IN (SELECT term_taxonomy_id FROM temprel)DELETE FROM wp_term_taxonomy WHERE term_taxonomy_id IN (SELECT term_taxonomy_id FROM temprel)DELETE FROM wp_terms WHERE term_taxonomy_id IN (SELECT term_taxonomy_id FROM temprel)Forum: Fixing WordPress
In reply to: Mass delete unpopular TagsThanks a lot for your response! What do you think of this code, will it work?
$x = 5; // set this to any number $sql = "SELECT <code>name</code> FROM <code>wp_terms</code>"; $result = mysql_query($sql); $count = array(); while($row = mysql_fetch_assoc($result)) { $count[$name]++; } foreach($count as $key = $value) { if($value < $x) { $sql2 = "DELETE FROM <code>wp_terms</code> WHERE <code>name</code> = '". $key ."'"; $result2 = mysql_query($sql2); } }