Title: Bug report: SQL syntax error
Last modified: July 2, 2023

---

# Bug report: SQL syntax error

 *  Resolved [p15h](https://wordpress.org/support/users/prestonwordsworth/)
 * (@prestonwordsworth)
 * [2 years, 11 months ago](https://wordpress.org/support/topic/bug-report-sql-syntax-error/)
 * Dear [@smakazmi15](https://wordpress.org/support/users/smakazmi15/)
 * The following error appeared in our server log after upgrading to 2.5.7:
 *     ```wp-block-code
       Got error 'PHP message: 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 '%i AS pl ORDER BY pl.time desc LIMIT 0, 25' at line 1 for query SELECT pl.id,pl.original_subject,pl.to_header,pl.success,pl.time FROM %i AS pl ORDER BY pl.time desc LIMIT 0, 25 made by do_action('wp_ajax_ps-get-email-logs'), WP_Hook->do_action, WP_Hook->apply_filters, PostmanEmailLogs->get_logs_ajax, PostmanEmailQueryLog->get_logs; PHP message: 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 '%i AS pl ORDER BY pl.time desc' at line 1 for query SELECT COUNT(*) as count FROM %i AS pl ORDER BY pl.time desc  made by do_action('wp_ajax_ps-get-email-logs'), WP_Hook->do_action, WP_Hook->apply_filters, PostmanEmailLogs->get_logs_ajax, PostmanEmailQueryLog->get_filtered_rows_count', referer: https://hostname/wp-admin/admin.php?page=postman_email_log
       ```
   
 * MySQL version: 8.0.33

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

 *  [M Haseeb](https://wordpress.org/support/users/haseeb0001/)
 * (@haseeb0001)
 * [2 years, 11 months ago](https://wordpress.org/support/topic/bug-report-sql-syntax-error/#post-16865319)
 * Hi [@prestonwordsworth](https://wordpress.org/support/users/prestonwordsworth/)
 * I hope you are doing well.
 * Please update your Website WordPress to the latest version, test it, and let 
   me know.
 * Thanks and regards,
   Support Team – WPExperts
 *  [M Haseeb](https://wordpress.org/support/users/haseeb0001/)
 * (@haseeb0001)
 * [2 years, 11 months ago](https://wordpress.org/support/topic/bug-report-sql-syntax-error/#post-16868041)
 * Hi [@prestonwordsworth](https://wordpress.org/support/users/prestonwordsworth/),
   
   To follow up, I would like to know if you have updated your WordPress installation
   to version 6.2.2 and if your issue is resolved now.Looking forward to your confirmation.
   Thanks and regards,Support Team – WPExperts
 *  [M Haseeb](https://wordpress.org/support/users/haseeb0001/)
 * (@haseeb0001)
 * [2 years, 11 months ago](https://wordpress.org/support/topic/bug-report-sql-syntax-error/#post-16874625)
 * [@prestonwordsworth](https://wordpress.org/support/users/prestonwordsworth/) 
   it has been confirmed from multiple sources that the respective issue has been
   resolved after updating to the latest 6.2.2 version of WordPress.
   **REF**: [https://wordpress.org/support/topic/logs-are-not-showing/](https://wordpress.org/support/topic/logs-are-not-showing/)
 * Feel free to reopen this issue in case the problem persists.
 * Thanks and regards,
   Support Team – WPExperts
 *  [lkraav](https://wordpress.org/support/users/lkraav/)
 * (@lkraav)
 * [2 years, 11 months ago](https://wordpress.org/support/topic/bug-report-sql-syntax-error/#post-16879724)
 * OK unfortunately lack of ability to build Post SMTP with recent WP core versions
   compatibility is a “drop this plugin” signal.
 *  Thread Starter [p15h](https://wordpress.org/support/users/prestonwordsworth/)
 * (@prestonwordsworth)
 * [2 years, 11 months ago](https://wordpress.org/support/topic/bug-report-sql-syntax-error/#post-16881927)
 * Thanks for fixing this so quickly [@haseeb0001](https://wordpress.org/support/users/haseeb0001/).
   And thanks to [@lkraav](https://wordpress.org/support/users/lkraav/) for the 
   input.

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

The topic ‘Bug report: SQL syntax error’ is closed to new replies.

 * ![](https://ps.w.org/post-smtp/assets/icon-128x128.gif?rev=3209655)
 * [Post SMTP – Complete Email Deliverability and SMTP Solution with Email Logs, Alerts, Backup SMTP & Mobile App](https://wordpress.org/plugins/post-smtp/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/post-smtp/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/post-smtp/)
 * [Active Topics](https://wordpress.org/support/plugin/post-smtp/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/post-smtp/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/post-smtp/reviews/)

 * 5 replies
 * 3 participants
 * Last reply from: [p15h](https://wordpress.org/support/users/prestonwordsworth/)
 * Last activity: [2 years, 11 months ago](https://wordpress.org/support/topic/bug-report-sql-syntax-error/#post-16881927)
 * Status: resolved