Title: Error in SQL syntax, Version 4.1.5
Last modified: September 18, 2022

---

# Error in SQL syntax, Version 4.1.5

 *  Resolved [Nicki Faulk](https://wordpress.org/support/users/nitallica/)
 * (@nitallica)
 * [3 years, 8 months ago](https://wordpress.org/support/topic/error-in-sql-syntax-version-4-1-5/)
 * I’m seeing the below error on both blogs of mine that use this plugin. If I downgrade
   to 4.1.1, I don’t see the errors (but I would rather stay on latest and greatest
   for security). I see that this error occurred for [someone here 3-4 months](https://wordpress.org/support/topic/sql-query-bug-in-google-xml-sitemaps-v-4-1-4/)
   back in v4.1.4. Is anyone else seeing this?
    - **Version numbers:** WordPress Version 6.0.2, plugin Version 4.1.5
    - **The URL to blog:** [nowwerecookin.org](https://www.nowwerecookin.org/) and
      [nickifaulk.com](https://www.nickifaulk.com/) both run this.
    - **Software of webserver:** Apache/2.4.54
    - **List of other plugins used, especially plugins which modify the output, 
      like caching or SEO plugins:** Akismet, Classic Editor, Display Posts, Print
      PDF, Remove Noreferrer, Search Meter, Sharify, TaxoPress, Very Simple Contact
      Form, WP Super Cache
 * **Error_log contents:**
 *     ```
       [18-Sep-2022 07:12:37 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 '->posts} p WHERE p.post_status='publish'' at line 1 for query SELECT COUNT(*) FROM {$wpdb->posts} p WHERE p.post_status='publish' made by do_action_ref_array('sm_ping_daily'), WP_Hook->do_action, WP_Hook->apply_filters, GoogleSitemapGeneratorLoader::call_send_ping_daily, GoogleSitemapGenerator->send_ping_daily, GoogleSitemapGenerator->send_stats
       [18-Sep-2022 13:54:54 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 '->posts} p WHERE p.post_status='publish'' at line 1 for query SELECT COUNT(*) FROM {$wpdb->posts} p WHERE p.post_status='publish' made by do_action_ref_array('sm_ping_daily'), WP_Hook->do_action, WP_Hook->apply_filters, GoogleSitemapGeneratorLoader::call_send_ping_daily, GoogleSitemapGenerator->send_ping_daily, GoogleSitemapGenerator->send_stats
       [18-Sep-2022 19:04:22 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 '->posts} p WHERE p.post_status='publish'' at line 1 for query SELECT COUNT(*) FROM {$wpdb->posts} p WHERE p.post_status='publish' made by do_action_ref_array('sm_ping_daily'), WP_Hook->do_action, WP_Hook->apply_filters, GoogleSitemapGeneratorLoader::call_send_ping_daily, GoogleSitemapGenerator->send_ping_daily, GoogleSitemapGenerator->send_stats
       ```
   
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Ferror-in-sql-syntax-version-4-1-5%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 4 replies - 1 through 4 (of 4 total)

 *  [saurabhdhariwal01](https://wordpress.org/support/users/saurabhdhariwal01/)
 * (@saurabhdhariwal01)
 * [3 years, 8 months ago](https://wordpress.org/support/topic/error-in-sql-syntax-version-4-1-5/#post-16026597)
 * Thanks for reaching out to us. We have already tackled this issue. The new version
   deployment is on the cards, once you update to the latest version, the issue 
   will be fixed.
 *  Thread Starter [Nicki Faulk](https://wordpress.org/support/users/nitallica/)
 * (@nitallica)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/error-in-sql-syntax-version-4-1-5/#post-16145783)
 * Heyya, any timeline on that new version being released? I’m having to clean up
   these error-logs pretty often now. 😛
 *  [saurabhdhariwal01](https://wordpress.org/support/users/saurabhdhariwal01/)
 * (@saurabhdhariwal01)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/error-in-sql-syntax-version-4-1-5/#post-16147934)
 * Hello [@nitallica](https://wordpress.org/support/users/nitallica/),
    We plan 
   to release the new version in two to three weeks.
 *  Thread Starter [Nicki Faulk](https://wordpress.org/support/users/nitallica/)
 * (@nitallica)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/error-in-sql-syntax-version-4-1-5/#post-16149299)
 * Awesomesauce, thanks! 🙂

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Error in SQL syntax, Version 4.1.5’ is closed to new replies.

 * ![](https://ps.w.org/google-sitemap-generator/assets/icon-256x256.png?rev=2713572)
 * [XML Sitemap Generator for Google](https://wordpress.org/plugins/google-sitemap-generator/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/google-sitemap-generator/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/google-sitemap-generator/)
 * [Active Topics](https://wordpress.org/support/plugin/google-sitemap-generator/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/google-sitemap-generator/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/google-sitemap-generator/reviews/)

## Tags

 * [MySQL](https://wordpress.org/support/topic-tag/mysql/)
 * [sql-error](https://wordpress.org/support/topic-tag/sql-error/)

 * 4 replies
 * 2 participants
 * Last reply from: [Nicki Faulk](https://wordpress.org/support/users/nitallica/)
 * Last activity: [3 years, 7 months ago](https://wordpress.org/support/topic/error-in-sql-syntax-version-4-1-5/#post-16149299)
 * Status: resolved