WordPress.org

Forums

Posts 2 Posts
error (3 posts)

  1. great-taste
    Member
    Posted 1 year ago #

    I know that support is discontinued but I'm starting this post just in case anyone knows how to help. I'd really appreciate any direction you can give.

    I'm a beginner and I don't even know where to start.

    Thank you

    [Mon Jan 20 18:43:21 2014] [error] [client 5.255.253.21] WordPress database error Operand should contain 1 column(s) for query SELECT wp_posts.*, wp_wpecbd.* , wp_p2p.* FROM wp_posts LEFT JOIN wp_wpecbd ON wp_posts.ID = wp_wpecbd.post_id INNER JOIN wp_p2p WHERE 1=1 AND wp_posts.post_type = 'my_culinary_recipe' AND (wp_posts.post_status = 'publish') AND (wp_p2p.p2p_type = 'my_culinary_recipe_to_wpecbd' AND wp_posts.ID = wp_p2p.p2p_from AND wp_p2p.p2p_to IN (SELECT wp_posts.ID, wp_wpecbd.* FROM wp_posts LEFT JOIN wp_wpecbd ON wp_posts.ID = wp_wpecbd.post_id WHERE 1=1 AND wp_posts.ID IN (197698) AND wp_posts.post_type = 'wpecbd' AND (wp_posts.post_status = 'publish') ORDER BY wp_posts.post_date DESC )) ORDER BY wp_posts.post_date DESC /* From [www.great-taste.net/listing/canyon-pizza-yorba-linda/] in [/nas/wp/www/cluster-1063/greattaste/wp-content/plugins/posts-to-posts/core/side-post.php:105] */ made by require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), include('/themes/genesis/single.php'), genesis, do_action('genesis_loop'), call_user_func_array, genesis_do_loop, genesis_standard_loop, do_action('genesis_entry_footer'), call_user_func_array, bop_genesis, genesis_widget_area, dynamic_sidebar, call_user_func_array, WP_Widget->display_callback, P2P_Widget->widget, P2P_List_Renderer::query_and_render, call_user_func, P2P_Directed_Connection_Type->get_connected, P2P_Directed_Connection_Type->abstract_query, P2P_Side_Post->do_query, WP_Query->__construct, WP_Query->query, WP_Query->get_posts

    http://wordpress.org/plugins/posts-to-posts/

  2. great-taste
    Member
    Posted 1 year ago #

    I see two colons in a row in this error. Could that be messing up the code? Any ideas where to fix that directive?
    Please, someone come up with a bright idea. I have many connections but get this error way too many times.
    thank you,

  3. tedinoz
    Member
    Posted 1 year ago #

    Hi

    That's some query for a beginner. Can you indicate the context in which the error occurred?

    The error message "Operand should contain 1 column(s) for query" is the key. If you had googled this you would have found a lot of hits, most of which would have helped you.

    Anyway...
    1 = the query has a WHERE condition: "wp_p2p.p2p_to IN (SELECT...".
    2 = This Select returns two columns "wp_posts.ID" and "wp_wpecbd.*".
    3 = But the "IN" condition is only expecting one column.
    Result = error.

    Delete one of those columns in the Select and it should be fine.

    Ted

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Posts 2 Posts
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags

No tags yet.