Error in SQL Syntax
-
Recently started getting this error repeatedly in debug logs:
[15-Oct-2023 06:43:52 UTC] 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 ‘) AND 1=1 AND ((s.source = ‘post.download’ AND (s.attribute IN (‘title’,’cont…’ at line 4 for query SELECT SQL_CALC_FOUND_ROWS s.id,s.source,s.site,SUM(relevance) AS relevance
FROM (SELECT s.id,s.source,s.site,s.attribute,((SUM(s.occurrences) * CASE WHEN ( (s.source = ‘post.download’ AND (s.attribute IN (‘title’))) ) THEN 300 WHEN ( (s.source = ‘post.download’ AND (s.attribute IN (‘content’,’taxonomy.download_tag’))) ) THEN 150 WHEN ( (s.source = ‘post.download’ AND (s.attribute IN (‘taxonomy.download_category’))) ) THEN 1 END) ) AS relevance
FROM plg_searchwp_index s LEFT JOIN plg_posts s1 ON (s1.ID = s.id)
WHERE 1=1 AND 1=1 AND s.token IN () AND 1=1 AND ((s.source = ‘post.download’ AND (s.attribute IN (‘title’,’content’,’taxonomy.download_category’,’taxonomy.download_tag’)) AND ( (s1
.post_type
= ‘download’ ) AND (s1
.post_status
IN ( ‘publish’, ‘acf-disabled’ ) ) AND (s1
.ID
NOT IN ( 98132, 98091, 98079, 74414, 74252, 73017, 61909, 61867, 61814, 16682, 16681, 16680, 14904, 13987, 13316, 11998, 11997, 9021, 9018, 8916, 6707, 6708, 6709, 6710, 6704, 6705, 6706, 6703, 6696, 5503, 5385, 5316, 5314, 5217, 4944, 4817, 4806, 4610, 4611, 4612, 4613, 4614, 4615, 4129, 3636, 3639, 3447, 3108, 2977, 1200, 1129, 296, 100 ) ) )))
GROUP BY s.site,s.source,s.attribute,s.id) AS s
LEFT JOIN plg_posts s1 ON (s1.ID = s.id)
WHERE 1=1 AND (SUBSTRING(s.source, 1, 5) != ‘post.’ OR (SUBSTRING(s.source, 1, 5) = ‘post.’ AND s.id != ‘0’))
GROUP BY s.site, s.source, s.id
HAVING relevance > 0
ORDER BY relevance DESC
LIMIT 0, 50 made by do_action(‘wp_ajax_nopriv_searchwp_live_search’), WP_Hook->do_action, WP_Hook->apply_filters, SearchWP_Live_Search_Client->search, SearchWP_Live_Search_Client->search_get_args, SearchWP_Live_Search_Client->search_get_args_searchwp, SearchWP_Live_Search_Client->search_get_args_post__in_searchwp, SearchWP_Live_Search_Client->search_get_args_post__in_searchwp_v4, SWP_Query->__construct, SWP_Query->get_search_results, SearchWP\Query->__construct, SearchWP\Query->run, SearchWP\Query->find_results, SearchWP\Query->execute
- The topic ‘Error in SQL Syntax’ is closed to new replies.