[Plugin: Posts 2 Posts] SQL error
-
Sorry S, me again
Trying to update all my connections with new update/updated code.
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 ‘) GROUP BY tp_posts.ID ORDER BY tp_posts.post_date DESC’ at line 1]SELECT tp_posts.*, tp_p2p.* FROM tp_posts INNER JOIN tp_term_relationships ON (tp_posts.ID = tp_term_relationships.object_id) INNER JOIN tp_p2p WHERE 1=1 AND ( tp_term_relationships.term_taxonomy_id IN (1082) ) AND tp_posts.post_type = ‘post’ AND (tp_posts.post_status = ‘publish’ OR tp_posts.post_status = ‘private’) AND () GROUP BY tp_posts.ID ORDER BY tp_posts.post_date DESC
from
$connected = new WP_Query( array( 'post_type' => 'post', 'posts_per_page' => '5', 'orderby' => 'rand', 'connected_type' => 'posts_to_posts', 'connected_items' => get_queried_object_id(), 'nopaging' => true ) );
Viewing 13 replies - 1 through 13 (of 13 total)
Viewing 13 replies - 1 through 13 (of 13 total)
- The topic ‘[Plugin: Posts 2 Posts] SQL error’ is closed to new replies.