Title: SQL syntax /*!SElEcT*/
Last modified: December 11, 2017

---

# SQL syntax /*!SElEcT*/

 *  Resolved [darylpittman](https://wordpress.org/support/users/darylpittman/)
 * (@darylpittman)
 * [8 years, 6 months ago](https://wordpress.org/support/topic/sql-syntax-select/)
 * I am receiving repeated single, 16-page SQL syntax errors on my php_errorlog:
 * 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”,’
   _wp_session_-1′ AND (/*!SElEcT*/ 8041 FRoM(/*!selEcT*/ COUNT(*),CONCAt((/*!Se’
   at line 1 for query DELETE FROM zing_options WHERE option_name IN
 * After IN the code repeats _wp_session_expires_… (with something which looks like
   crypto or salts, different each time for 16 pages.)
 * the error ends with:
 * made by do_action_ref_array, WP_Hook->do_action, WP_Hook->apply_filters, wp_session_cleanup
 * Is there a way to determine where to start poking for some solution?

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

 *  Moderator [James Huff](https://wordpress.org/support/users/macmanx/)
 * (@macmanx)
 * [8 years, 6 months ago](https://wordpress.org/support/topic/sql-syntax-select/#post-9772719)
 * Try deactivating all plugins. If that resolves the issue, reactivate each one
   individually until you find the cause.
 * If that does not resolve the issue, try switching to the Twenty Seventeen theme
   to rule-out a theme-specific issue (theme functions can interfere like plugins).
 *  Thread Starter [darylpittman](https://wordpress.org/support/users/darylpittman/)
 * (@darylpittman)
 * [8 years, 6 months ago](https://wordpress.org/support/topic/sql-syntax-select/#post-9772737)
 * Aaaahhhhhhh! … That’s so A/B! I’m a _graphic designer_.
 * jk
 * I think I’ll actually do that this time. I might learn something, you know.
 * Thanks!
 * I’ll keep you posted.
 *  Moderator [James Huff](https://wordpress.org/support/users/macmanx/)
 * (@macmanx)
 * [8 years, 6 months ago](https://wordpress.org/support/topic/sql-syntax-select/#post-9772755)
 * Here are some instructions if you need them:
 * [https://codex.wordpress.org/Managing_Plugins](https://codex.wordpress.org/Managing_Plugins)
 * [https://codex.wordpress.org/Using_Themes](https://codex.wordpress.org/Using_Themes)
 *  Thread Starter [darylpittman](https://wordpress.org/support/users/darylpittman/)
 * (@darylpittman)
 * [8 years, 6 months ago](https://wordpress.org/support/topic/sql-syntax-select/#post-9772786)
 * Thank you.
 *  Thread Starter [darylpittman](https://wordpress.org/support/users/darylpittman/)
 * (@darylpittman)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/sql-syntax-select/#post-9775869)
 * FOLLOWUP
    I have deactivated all plugins and in the process of systematically(
   re)activating on my paralleled Development site.
 * An interesting note, for those playing at home, is the php_errorlog is updated(
   written to) every hour, on the hour.
 * … I’ll be back.
 *  Moderator [James Huff](https://wordpress.org/support/users/macmanx/)
 * (@macmanx)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/sql-syntax-select/#post-9775954)
 * Did the error stop while all plugins were deactivated?
 *  Thread Starter [darylpittman](https://wordpress.org/support/users/darylpittman/)
 * (@darylpittman)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/sql-syntax-select/#post-9776051)
 * Yes. I am currently in the process of systematically (re)activating plugins. 
   The errorlog for the DEV site has not been written to, as of yet, during this
   time while the errorlog on the PROD site is being written to every hour.
 *  Thread Starter [darylpittman](https://wordpress.org/support/users/darylpittman/)
 * (@darylpittman)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/sql-syntax-select/#post-9776760)
 * CLOSURE
    I have confidently determined the errors written to my php_errorlog 
   were caused by a “Premium” plugin of which premiums were not paid …
 * A word from the wisened:
    Deactivate plugins which are not used. Better yet, 
   delete them. You can always download them again if you want to experiment.
 * Thanks, James Huff!
 * You can move this discussion to Support>>Fixing WordPress>>user_error
 *  Moderator [James Huff](https://wordpress.org/support/users/macmanx/)
 * (@macmanx)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/sql-syntax-select/#post-9776913)
 * You’re welcome, glad you found the problem! 🙂
 *  Thread Starter [darylpittman](https://wordpress.org/support/users/darylpittman/)
 * (@darylpittman)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/sql-syntax-select/#post-9777148)
 * And how!

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

The topic ‘SQL syntax /*!SElEcT*/’ is closed to new replies.

## Tags

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

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 10 replies
 * 2 participants
 * Last reply from: [darylpittman](https://wordpress.org/support/users/darylpittman/)
 * Last activity: [8 years, 5 months ago](https://wordpress.org/support/topic/sql-syntax-select/#post-9777148)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
