“error in your SQL syntax”
-
Another error that’s been popping up in our logs for months:
It’s from
product-add-ons-woocommerce/includes/Model/Group.php
lines 348ff. The$categories
variable contains nothing, and so in only filled in as empty string.WordPress database error You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ') OR p.product_id IN (4433487) OR g.apply_to = 'all' GROUP BY g.id OR...' at line 5 for query SELECT g.*, GROUP_CONCAT(DISTINCT c.category_id) as <code>categories</code>, GROUP_CONCAT(DISTINCT p.product_id) as <code>products</code> FROM wp_za_groups as g LEFT JOIN wp_za_categories_to_groups as c ON c.group_id = g.id LEFT JOIN wp_za_products_to_groups as p ON p.group_id = g.id WHERE c.category_id IN () OR p.product_id IN (4433487) OR g.apply_to = 'all' GROUP BY g.id ORDER BY g.priority ASC from require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), include('/themes/Divi/includes/builder/frontend-builder/theme-builder/frontend-body-template.php'), get_footer, do_action('get_footer'), WP_Hook->do_action, WP_Hook->apply_filters, et_theme_builder_frontend_override_footer, et_theme_builder_frontend_override_partial, require_once('/themes/Divi/includes/builder/frontend-builder/theme-builder/frontend-footer-template.php'), wp_footer, do_action('wp_footer'), WP_Hook->do_action, WP_Hook->apply_filters, et_fb_wp_footer, et_fb_enqueue_assets, do_action('et_fb_enqueue_assets'), WP_Hook->do_action, WP_Hook->apply_filters, et_fb_backend_helpers, et_fb_get_dynamic_backend_helpers, et_fb_current_page_params, et_fb_current_page_woocommerce_components, ET_Builder_Module_Woocommerce_Upsells::get_upsells, et_builder_wc_render_module_template, woocommerce_upsell_display, wc_get_template, include('/plugins/woocommerce/templates/single-product/up-sells.php'), wc_get_template_part, load_template, require('/plugins/woocommerce/templates/content-product.php'), do_action('woocommerce_after_shop_loop_item_title'), WP_Hook->do_action, WP_Hook->apply_filters, woocommerce_template_loop_add_to_cart, wc_get_template, include('/plugins/woocommerce/templates/loop/add-to-cart.php'), WC_Product_Variable->add_to_cart_text, apply_filters('woocommerce_product_add_to_cart_text'), WP_Hook->apply_filters, ZAddons\Frontend\Shop->add_to_cart_text, ZAddons\Frontend::hasTypes, ZAddons\Model\Group::getByProduct
Version info:
PAOfWC: 2.1.38
WC 6.3.1
WP 5.9.3
PHP 8.0.17
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘“error in your SQL syntax”’ is closed to new replies.