Title: SQL error
Last modified: August 21, 2016

---

# SQL error

 *  [chpalatinus](https://wordpress.org/support/users/chpalatinus/)
 * (@chpalatinus)
 * [11 years, 12 months ago](https://wordpress.org/support/topic/sql-error-20/)
 * After upgrading to the latest version, I get SQL errors and lists are not displayed
   correctly:
 *     ```
       [12-Jun-2014 08:04:49 UTC] WordPress-Datenbank-Fehler 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 '-1' at line 1 für Abfrage SELECT SQL_CALC_FOUND_ROWS  wp_posts.ID FROM wp_posts  INNER JOIN wp_term_relationships ON (wp_posts.ID = wp_term_relationships.object_id) WHERE 1=1  AND ( wp_term_relationships.term_taxonomy_id IN (1) ) AND wp_posts.post_type = 'post' AND ((wp_posts.post_status = 'publish')) GROUP BY wp_posts.ID ORDER BY wp_posts.post_date DESC LIMIT 0, -1 von require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), do_action('template_redirect'), call_user_func_array, AviaBuilder->template_redirect, require_once('/themes/enfold/template-builder.php'), apply_filters('the_content'), call_user_func_array, do_shortcode, preg_replace_callback, do_shortcode_tag, call_user_func, aviaShortcodeTemplate->shortcode_handler_prepare, avia_sc_columns->shortcode_handler, ShortcodeHelper::avia_remove_autop, do_shortcode, preg_replace_callback, do_shortcode_tag, call_user_func, aviaShortcodeTemplate->shortcode_handler_prepare, avia_sc_text->shortcode_handler, ShortcodeHelper::avia_apply_autop, do_shortcode, preg_replace_callback, do_shortcode_tag, call_user_func, APLCore->APL_handler_shortcode, APLCore->APL_display, APLCore->APL_run, APLQuery->query_wp, APLQuery->query_wp, WP_Query->__construct, WP_Query->query, WP_Query->get_posts
       [12-Jun-2014 08:04:49 UTC] WordPress-Datenbank-Fehler 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 '-1' at line 1 für Abfrage SELECT SQL_CALC_FOUND_ROWS  wp_posts.ID FROM wp_posts  WHERE 1=1  AND wp_posts.ID IN (0) AND wp_posts.post_type IN ('post', 'page', 'attachment', 'portfolio', 'avia_framework_post') AND (wp_posts.post_status = 'publish' OR wp_posts.post_status = 'closed' OR wp_posts.post_author = 2 AND wp_posts.post_status = 'private' OR wp_posts.post_author = 2 AND wp_posts.post_status = 'hidden')  ORDER BY wp_posts.post_date DESC LIMIT 0, -1 von require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), do_action('template_redirect'), call_user_func_array, AviaBuilder->template_redirect, require_once('/themes/enfold/template-builder.php'), apply_filters('the_content'), call_user_func_array, do_shortcode, preg_replace_callback, do_shortcode_tag, call_user_func, aviaShortcodeTemplate->shortcode_handler_prepare, avia_sc_columns->shortcode_handler, ShortcodeHelper::avia_remove_autop, do_shortcode, preg_replace_callback, do_shortcode_tag, call_user_func, aviaShortcodeTemplate->shortcode_handler_prepare, avia_sc_text->shortcode_handler, ShortcodeHelper::avia_apply_autop, do_shortcode, preg_replace_callback, do_shortcode_tag, call_user_func, APLCore->APL_handler_shortcode, APLCore->APL_display, APLCore->APL_run, APLQuery->query_wp, WP_Query->__construct, WP_Query->query, WP_Query->get_posts
       ```
   
 * [https://wordpress.org/plugins/advanced-post-list/](https://wordpress.org/plugins/advanced-post-list/)

The topic ‘SQL error’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/advanced-post-list.svg)
 * [Advanced Post List](https://wordpress.org/plugins/advanced-post-list/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/advanced-post-list/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/advanced-post-list/)
 * [Active Topics](https://wordpress.org/support/plugin/advanced-post-list/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/advanced-post-list/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/advanced-post-list/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [chpalatinus](https://wordpress.org/support/users/chpalatinus/)
 * Last activity: [11 years, 12 months ago](https://wordpress.org/support/topic/sql-error-20/)
 * Status: not resolved