John Thurston / February 24, 2009, 7:59 AMThere is an error on line 66 of most-comments-options.php. You have used the explicit name of the tabels to query rather than using $wpdb-> .. It works if you are using the default table names but fails if you aren’t. Even worse, if you have multiple wordpress sites in the same database (with different table prefixes) it grabs categories from the wrong wordpress site.I used: $request = SELECT wptermtax.term_id, wptermtax.term_taxonomy_id, wptermtax.taxonomy, wpterms.name, wpterms.slug FROM $wpdb->term_taxonomy wptermtax, $wpdb->terms wpterms WHERE wptermtax.term_id = wpterms.term_id AND wptermtax.taxonomy = category’ ORDER BY wp terms.name ;and it seems to work
Leave a Reply
Commenting policy: Some comments run the risk of being deleted. These include comments that are spam or cannot be understood or are rude.
John Thurston / February 24, 2009, 7:59 AMThere is an error on line 66 of most-comments-options.php. You have used the explicit name of the tabels to query rather than using $wpdb-> .. It works if you are using the default table names but fails if you aren’t. Even worse, if you have multiple wordpress sites in the same database (with different table prefixes) it grabs categories from the wrong wordpress site.I used: $request = SELECT wptermtax.term_id, wptermtax.term_taxonomy_id, wptermtax.taxonomy, wpterms.name, wpterms.slug FROM $wpdb->term_taxonomy wptermtax, $wpdb->terms wpterms WHERE wptermtax.term_id = wpterms.term_id AND wptermtax.taxonomy = category’ ORDER BY wp terms.name ;and it seems to work