• 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
    https://www.gurtip.it

    https://www.ads-software.com/extend/plugins/microkids-related-posts/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter Riccardo

    (@riccardof)

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

    Thread Starter Riccardo

    (@riccardof)

    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

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Plugin: Related Posts for WordPress] SQL error when invoking function manually (only)’ is closed to new replies.