Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WordPress database error Incorrect usage of UNION and LIMIT #25

Open
anormore opened this issue Nov 28, 2017 · 3 comments
Open

WordPress database error Incorrect usage of UNION and LIMIT #25

anormore opened this issue Nov 28, 2017 · 3 comments

Comments

@anormore
Copy link

[28-Nov-2017 22:10:52 UTC] WordPress database error Incorrect usage of UNION and LIMIT for query SELECT SQL_CALC_FOUND_ROWS tables.* FROM ( SELECT wp_posts., '1' AS site_ID FROM wp_posts WHERE 1=1 AND wp_posts.post_type = 'slider' AND ((wp_posts.post_status = 'publish')) LIMIT 0, 20 UNION SELECT wp_2_posts., '2' AS site_ID FROM wp_2_posts WHERE 1=1 AND wp_2_posts.post_type = 'slider' AND ((wp_2_posts.post_status = 'publish')) LIMIT 0, 20 UNION SELECT wp_5_posts., '5' AS site_ID FROM wp_5_posts WHERE 1=1 AND wp_5_posts.post_type = 'slider' AND ((wp_5_posts.post_status = 'publish')) LIMIT 0, 20 UNION SELECT wp_7_posts., '7' AS site_ID FROM wp_7_posts WHERE 1=1 AND wp_7_posts.post_type = 'slider' AND ((wp_7_posts.post_status = 'publish')) LIMIT 0, 20 UNION SELECT wp_8_posts., '8' AS site_ID FROM wp_8_posts WHERE 1=1 AND wp_8_posts.post_type = 'slider' AND ((wp_8_posts.post_status = 'publish')) LIMIT 0, 20 UNION SELECT wp_9_posts., '9' AS site_ID FROM wp_9_posts WHERE 1=1 AND wp_9_posts.post_type = 'slider' AND ((wp_9_posts.post_status = 'publish')) LIMIT 0, 20 UNION SELECT wp_11_posts., '11' AS site_ID FROM wp_11_posts WHERE 1=1 AND wp_11_posts.post_type = 'slider' AND ((wp_11_posts.post_status = 'publish')) LIMIT 0, 20 UNION SELECT wp_14_posts., '14' AS site_ID FROM wp_14_posts WHERE 1=1 AND wp_14_posts.post_type = 'slider' AND ((wp_14_posts.post_status = 'publish')) LIMIT 0, 20 UNION SELECT wp_15_posts.*, '15' AS site_ID FROM wp_15_posts WHERE 1=1 AND wp_15_posts.post_type = 'slider' AND ((wp_15_posts.post_status = 'publish')) LIMIT 0, 20) tables ORDER BY tables.post_date DESC LIMIT 0, 10 made by do_action('wp_ajax_askyu_search'), WP_Hook->do_action, WP_Hook->apply_filters, askyu_search, WP_Query_Multisite->__construct, WP_Query->query, WP_Query->get_posts

@anormore
Copy link
Author

Why?

@mariovalney
Copy link

It's the same of #26

@mariovalney
Copy link

Please, check this fix: #27

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants