Getting SQL error
-
I am getting below sql error in my error_log file.
“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 ‘[188) GROUP BY ikaanya_braapf_product_variation_attributes.post_id ) as filtered’ at line 1 for query SELECT filtered_post.id, filtered_post.out_of_stock, COUNT(filtered_post.ID) as post_count FROM ( SELECT filtered_post.*, max_filtered_post.max_meta_count, IF(max_filtered_post.max_meta_count != filtered_post.meta_count OR stock_table.out_of_stock_init = 1, 1, 0) as out_of_stock FROM ( SELECT ikaanya_braapf_product_variation_attributes.post_id as var_id, ikaanya_braapf_product_variation_attributes.parent_id as ID, COUNT(ikaanya_braapf_product_variation_attributes.post_id) as meta_count FROM ikaanya_braapf_product_variation_attributes WHERE ikaanya_braapf_product_variation_attributes.meta_value_id IN (0,270cat,type[188) GROUP BY ikaanya_braapf_product_variation_attributes.post_id ) as filtered_post INNER JOIN ( SELECT post_id as ID, COUNT(post_id) as max_meta_count FROM ikaanya_braapf_variation_attributes WHERE taxonomy IN (‘pa_use’) GROUP BY post_id ) as max_filtered_post ON max_filtered_post.ID = filtered_post.ID LEFT JOIN ( SELECT ikaanya_braapf_product_stock_status_parent.post_id as id, IF(ikaanya_braapf_product_stock_status_parent.stock_status = 1, 0, 1) as out_of_stock_init FROM ikaanya_braapf_product_stock_status_parent GROUP BY id ) as stock_table ON filtered_post.var_id = stock_table.id GROUP BY filtered_post.ID, out_of_stock ) as filtered_post GROUP BY filtered_post.ID HAVING post_count = 1 AND out_of_stock = 1 made by require(‘wp-blog-header.php’), require_once(‘wp-includes/template-loader.php’), include(‘/themes/adiva-child/woocommerce/archive-product.php’), dynamic_sidebar, WP_Widget->display_callback, BeRocket_new_AAPF_Widget_single->widget, BeRocket_AAPF_Widget->__construct, berocket_aapf_get_terms, BeRocket_AAPF_get_terms::get_terms, apply_filters(‘berocket_aapf_get_terms_filter_after’), WP_Hook->apply_filters, BeRocket_AAPF_get_terms::recount_products, apply_filters(‘berocket_aapf_recount_terms_apply’), WP_Hook->apply_filters, BeRocket_AAPF_faster_attribute_recount::recount_terms, BeRocket_AAPF_faster_attribute_recount::recount_terms_without_prepare, apply_filters(‘berocket_aapf_recount_terms_query’), WP_Hook->apply_filters, BeRocket_AAPF_compat_woocommerce_variation->faster_recount_add_data, apply_filters(‘berocket_add_out_of_stock_variable’), WP_Hook->apply_filters, BeRocket_AAPF_compat_woocommerce_variation::out_of_stock_variable “
The topic ‘Getting SQL error’ is closed to new replies.