Title: Database Error
Last modified: August 31, 2016

---

# Database Error

 *  Resolved [jkellerer](https://wordpress.org/support/users/jkellerer/)
 * (@jkellerer)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/database-error-206/)
 * I am getting a wordpress datbase error a couple times a day. I am not sure what
   it means, but I see that Yoast Dashbaord widget seems to be the major cause.
 * [11-Feb-2016 15:02:58 UTC] 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 ‘EXISTS ‘needs-a-value-anyway’ ORDER BY CAST(meta_value
   AS CHAR) ) ORDER BY CAST(‘ at line 1 for query SELECT DISTINCT post_id FROM xs_postmeta
   WHERE post_id NOT IN (SELECT post_id FROM xs_postmeta WHERE meta_key = ‘_yoast_wpseo_linkdex’
   AND CAST(meta_value AS CHAR) NOT EXISTS ‘needs-a-value-anyway’ ORDER BY CAST(
   meta_value AS CHAR) ) ORDER BY CAST(meta_value AS CHAR) made by wp_dashboard,
   do_meta_boxes, call_user_func, Yoast_Dashboard_Widget->display_dashboard_widget,
   Yoast_Dashboard_Widget->statistic_items, Yoast_Dashboard_Widget->set_statistic_items_for_this_user,
   Yoast_Dashboard_Widget->get_seo_scores_with_post_count, array_map, Yoast_Dashboard_Widget-
   >map_rank_to_widget, WPSEO_Statistics->get_post_count, WP_Query->__construct,
   WP_Query->query, WP_Query->get_posts, WP_Meta_Query->get_sql, apply_filters_ref_array,
   call_user_func_array, Piklist_WordPress::get_meta_sql, Piklist_WordPress::get_sql_for_query
 * [https://wordpress.org/plugins/wordpress-seo/](https://wordpress.org/plugins/wordpress-seo/)

The topic ‘Database Error’ is closed to new replies.

 * ![](https://ps.w.org/wordpress-seo/assets/icon-256x256.gif?rev=3419908)
 * [Yoast SEO - Advanced SEO with real-time guidance and built-in AI](https://wordpress.org/plugins/wordpress-seo/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wordpress-seo/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wordpress-seo/)
 * [Active Topics](https://wordpress.org/support/plugin/wordpress-seo/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wordpress-seo/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wordpress-seo/reviews/)

## Tags

 * [Database Error](https://wordpress.org/support/topic-tag/database-error/)

 * 0 replies
 * 1 participant
 * Last reply from: [jkellerer](https://wordpress.org/support/users/jkellerer/)
 * Last activity: [10 years, 4 months ago](https://wordpress.org/support/topic/database-error-206/)
 * Status: resolved