WordPress database error You have an error in your SQL syntax
-
I can see the following errors on my server caused by your plugin:
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 ‘) THEN 30 ELSE 0 END ) + ( CASE WHEN () THEN 10 ELSE 0 END ) + ( CASE WHEN () TH’ at line 1 for query SELECT wp_posts.ID, ( ( CASE WHEN () THEN 30 ELSE 0 END ) + ( CASE WHEN () THEN 10 ELSE 0 END ) + ( CASE WHEN () THEN 10 ELSE 0 END ) ) as relevance FROM wp_posts INNER JOIN wp_postmeta ON ( wp_posts.ID = wp_postmeta.post_id ) LEFT JOIN wp_term_relationships ysm_t_rel ON wp_posts.ID = ysm_t_rel.object_id LEFT JOIN wp_term_taxonomy ysm_t_tax ON ysm_t_tax.term_taxonomy_id = ysm_t_rel.term_taxonomy_id LEFT JOIN wp_terms ysm_t ON ysm_t_tax.term_id = ysm_t.term_id WHERE 1=1 AND ( ( wp_postmeta.meta_key = ‘_stock_status’ AND wp_postmeta.meta_value != ‘outofstock’ ) ) AND wp_posts.post_type = ‘product’ AND ((wp_posts.post_status = ‘publish’)) AND ( OR OR OR ( ysm_t_tax.taxonomy IN (‘product_tag’,’product_cat’) AND () )) AND ( wp_posts.post_type NOT IN (‘product’) OR ( wp_posts.post_type = ‘product’ AND wp_posts.ID NOT IN ( SELECT DISTINCT object_id FROM wp_term_relationships t_rel LEFT JOIN wp_term_taxonomy t_tax ON t_rel.term_taxonomy_id = t_tax.term_taxonomy_id WHERE t_tax.term_id IN (‘13374’) ) ) ) GROUP BY wp_posts.ID ORDER BY relevance DESC, wp_posts.post_title ASC LIMIT 0, 5 made by require(‘wp-blog-header.php’), wp, WP->main, WP->parse_request, do_action_ref_array(‘parse_request’), WP_Hook->do_action, WP_Hook->apply_filters, rest_api_loaded, WP_REST_Server->serve_request, WP_REST_Server->dispatch, WP_REST_Server->respond_to_request, YSM\Rest\handle_request, Ysm_Search::search_posts, Ysm_DB::do_query, WP_Query->__construct, WP_Query->query, WP_Query->get_posts [05-Sep-2023 18:33:10 UTC] 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 ‘) THEN 30 ELSE 0 END ) + ( CASE WHEN () THEN 10 ELSE 0 END ) + ( CASE WHEN () TH’ at line 1 for query SELECT wp_posts.ID, ( ( CASE WHEN () THEN 30 ELSE 0 END ) + ( CASE WHEN () THEN 10 ELSE 0 END ) + ( CASE WHEN () THEN 10 ELSE 0 END ) ) as relevance FROM wp_posts INNER JOIN wp_postmeta ON ( wp_posts.ID = wp_postmeta.post_id ) LEFT JOIN wp_term_relationships ysm_t_rel ON wp_posts.ID = ysm_t_rel.object_id LEFT JOIN wp_term_taxonomy ysm_t_tax ON ysm_t_tax.term_taxonomy_id = ysm_t_rel.term_taxonomy_id LEFT JOIN wp_terms ysm_t ON ysm_t_tax.term_id = ysm_t.term_id WHERE 1=1 AND ( ( wp_postmeta.meta_key = ‘_stock_status’ AND wp_postmeta.meta_value != ‘outofstock’ ) ) AND wp_posts.post_type = ‘product’ AND ((wp_posts.post_status = ‘publish’)) AND ( OR OR OR ( ysm_t_tax.taxonomy IN (‘product_tag’,’product_cat’) AND () )) AND ( wp_posts.post_type NOT IN (‘product’) OR ( wp_posts.post_type = ‘product’ AND wp_posts.ID NOT IN ( SELECT DISTINCT object_id FROM wp_term_relationships t_rel LEFT JOIN wp_term_taxonomy t_tax ON t_rel.term_taxonomy_id = t_tax.term_taxonomy_id WHERE t_tax.term_id IN (‘13374’) ) ) ) GROUP BY wp_posts.ID ORDER BY relevance DESC, wp_posts.post_title ASC LIMIT 0, 5 made by require(‘wp-blog-header.php’), wp, WP->main, WP->parse_request, do_action_ref_array(‘parse_request’), WP_Hook->do_action, WP_Hook->apply_filters, rest_api_loaded, WP_REST_Server->serve_request, WP_REST_Server->dispatch, WP_REST_Server->respond_to_request, YSM\Rest\handle_request, Ysm_Search::search_posts, Ysm_DB::do_query, WP_Query->__construct, WP_Query->query, WP_Query->get_posts
- The topic ‘WordPress database error You have an error in your SQL syntax’ is closed to new replies.