Article Directory WordPress Plugin SQL Error
I`m testing out this useful plug in of Dimox. Although the author can’t avoid some bugs, the plug-in, as a whole, is great.
If you are a user of this plug-in and happens to encounter the following sql error;
WordPress database error You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ” at line 1 for query
SELECT SUM(count) FROM wp_taxonomy WHERE taxonomy = ‘category’ AND parent = made by article_directory
OR
WordPress database error: [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘’ at line 1]
SELECT SUM(category_count) FROM wp_categories WHERE category_parent =
it means that sql, instead or returning a numeric value of ‘zero’, returns a “NULL”. If this error happened, just find the code that makes this sql query and enclose it with ‘if’. that is;
…
if($catid!='’){
$sub_child_summ = $wpdb->get_var(”SELECT SUM(category_count) FROM $wpdb->categories WHERE category_parent = $catid”);}
…
and/or
…
if($catid!='’){
$sub_child_summ = $wpdb->get_var(”SELECT SUM(count) FROM $wpdb->term_taxonomy WHERE taxonomy = ‘category’ AND parent = $catid”);}
…
Filed in: Wordpress
Local date: July, 2008












