WordPress.org

Forums

Related Posts for WordPress
SQL error when invoking function manually (only) (3 posts)

  1. Riccardo
    Member
    Posted 2 years ago #

    Hi,
    I really like the plugin, good job.

    I am having an issue when I try to call directly the API.
    The interesting thing is that this error only occur when I call the API function, whereas the automatic hook seems to work fine, even within the same page!

    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 wp.id = wpr.post2_id AND wp.post_status IN ('publish','private') ) AS tab1 ' at line 2]
    SELECT * FROM ( SELECT position2 as position_unified, wp.*, wpr.* FROM wpgtwp_post_relationships	wpr ,wpgtwp_posts	 wp WHERE wpr.post1_id = AND wp.id = wpr.post2_id AND wp.post_status IN ('publish','private') ) AS tab1 UNION ALL SELECT * FROM (SELECT position1 as position_unified, wp.*, wpr.* FROM wpgtwp_post_relationships	wpr ,wpgtwp_posts	 wp WHERE wpr.post2_id = AND wp.id = wpr.post1_id AND wp.post_status IN ('publish','private') ) AS tab2 ORDER BY 'position_unified' ASC, 'post_date' ASC

    Any idea of what might be going on?

    Riccardo
    http://www.gurtip.it

    http://wordpress.org/extend/plugins/microkids-related-posts/

  2. Riccardo
    Member
    Posted 2 years ago #

    p.s. the api call I am referring to is MRP_get_related_posts

  3. Riccardo
    Member
    Posted 2 years ago #

    p.p.s. forgive the pssss... I just wanted to say that I get no errors when using the shortcode as well.. I only have problems when I call the function directly

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Related Posts for WordPress
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags

No tags yet.