• I just upgraded to YARPP 3.0.5 and am using WP version 2.1.7. Now at the top of every post I get an error message:

    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 ‘-1’ at line 1]
    SELECT SQL_CALC_FOUND_ROWS wp_posts.*, yarpp.score FROM wp_posts join wp_yarpp_related_cache as yarpp using (ID) WHERE 1=1 AND wp_posts.post_type = ‘post’ AND (wp_posts.post_status = ‘publish’ OR wp_posts.post_status = ‘private’) and post_date > date_sub(now(), interval 12 month) ORDER BY wp_posts.post_date DESC limit -1

    ??

Viewing 5 replies - 1 through 5 (of 5 total)
  • @sara3903 please note that YARPP requires WP version 2.3 or higher.

    I’m getting a similar error in my search results rss feed.

    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 'post') AND post_type != 'revision'  ORDER BY yarpp.score DESC  limit 3' at line 1]
    
    		 SELECT DISTINCT SQL_CALC_FOUND_ROWS  wp_posts.*, yarpp.score FROM wp_posts  LEFT JOIN wp_term_relationships AS trel ON (wp_posts.ID = trel.object_id) LEFT JOIN wp_term_taxonomy AS ttax ON (  ( ttax.taxonomy = 'category' OR ttax.taxonomy = 'post_tag' )  AND trel.term_taxonomy_id = ttax.term_taxonomy_id) LEFT JOIN wp_terms AS tter ON (ttax.term_id = tter.term_id)  LEFT JOIN wp_postmeta AS m ON (wp_posts.ID = m.post_id)  LEFT JOIN wp_users AS u ON (wp_posts.post_author = u.ID)  join wp_yarpp_related_cache as yarpp using (ID) WHERE 1=1 AND ( yarpp.score > 5 and yarpp.reference_ID = 2930 AND wp_posts.post_type = 'post OR ((tter.name LIKE '%malkin%'))  OR ((m.meta_value LIKE '%malkin%'))  OR ((wp_posts.post_excerpt LIKE '%malkin%')) )ND yarpp.score > 5 and yarpp.reference_ID = 2930 AND wp_posts.post_type = 'post') AND post_type != 'revision'  ORDER BY yarpp.score DESC  limit 3

    So far I’ve only encountered the error when searching for the word “malkin” strangely enough. I’m running WP 2.8.2 and YARPP 3.0.7.

    Any thoughts?
    Thanks

    @sdhunt – hmm… Looking at that error, it’s very inconclusive as to why this is happening…

    By the way, are you trying to run this query directly using a certain keyword? That use of yarpp_sql is not supported.

    If you have SEO Pager plugin installed, disable auto implementation and add code to your template manually.
    https://www.ads-software.com/support/topic/267966

    This has been added to the FAQ.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘[Plugin: Yet Another Related Posts Plugin] MySQL Error’ is closed to new replies.