I have been personally maintaining the Search Everything plugin for WordPress since the authors stopped. I upgraded one of my sites to wp 3.7 today but i get this error when i search:
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'))) AND ncca_wp_posts.post_type IN ('post', 'page',
at line 1]
'attachment', 'archive', 'r'
SELECT DISTINCT SQL_CALC_FOUND_ROWS
ncca_wp_posts.*
FROM ncca_wp_posts
LEFT JOIN ncca_wp_term_relationships AS trel
ON ( ncca_wp_posts.ID = trel.object_id )
LEFT JOIN ncca_wp_term_taxonomy AS ttax
ON (
( ttax.taxonomy = 'category'
OR ttax.taxonomy = 'post_tag'
OR ttax.taxonomy = 'years'
OR ttax.taxonomy = 'archive-tags'
OR ttax.taxonomy = 'course'
)
AND trel.term_taxonomy_id = ttax.term_taxonomy_id
)
LEFT JOIN ncca_wp_terms AS tter
ON (ttax.term_id = tter.term_id)
LEFT JOIN ncca_wp_postmeta AS m
ON (ncca_wp_posts.ID = m.post_id)
WHERE 1=1
AND (
(
((()))
AND ncca_wp_posts.post_type IN ('post', 'page', 'attachment', 'archive', 'research-project')
AND (
ncca_wp_posts.post_status = 'publish'
OR ncca_wp_posts.post_status = 'private'
)
)
AND post_type != 'revision'
)
AND post_status != 'future'
ORDER BY ncca_wp_posts.post_title LIKE '% %' DESC, ncca_wp_posts.post_date DESC LIMIT 0, 24
Edit: Thank you kaiser. Taken on board for next time. I can see the error is being caused by an SQL syntax error, as stated above, but I cannot figure out how to fix it. Can anybody suggest how to alter this line of code to make it work correctly?
Thanks to @Pat J i removed the syntax that was causing me problems. For those who are interested, inside the Search Everything plugin, on line 198 – 221 there is the following function:
If you are using the Search Everything plugin on WP 3.7, you will need to edit this function accordingly, or differently if you know better. ( I am merely a beginner ). Many thanks!!