Title: SQL error on activation/deactivation
Last modified: August 22, 2016

---

# SQL error on activation/deactivation

 *  [billc108](https://wordpress.org/support/users/billc108/)
 * (@billc108)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/sql-error-on-activationdeactivation/)
 * I’m getting this error when activating or deactivating the latest version of 
   olimometer.
 * Using WP-CLI:
 * 103:test4 billc$ wp plugin activate olimometer
    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 ‘0’ at line 1 for query SELECT
   COUNT(*) FROM 0; made by include(‘phar:///opt/local/bin/wp/php/boot-phar.php’),
   include(‘phar:///opt/local/bin/wp/php/wp-cli.php’), WP_CLI\Runner->after_wp_load,
   WP_CLI\Runner->_run_command, WP_CLI\Runner->run_command, WP_CLI\Dispatcher\Subcommand-
   >invoke, call_user_func, WP_CLI\Dispatcher\CommandFactory::WP_CLI\Dispatcher\{
   closure}, call_user_func, Plugin_Command->activate, activate_plugin, do_action(‘
   activate_olimometer/olimometer.php’), call_user_func_array, olimometer_install
 * from the error log when activating/deactivating via WP Admin:
 * 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‘
   0’ at line 1 for query SELECT COUNT(*) FROM 0; made by activate_plugin, do_action(‘
   activate_olimometer/olimometer.php’), call_user_func_array, olimometer_install,
   referer: [http://](https://wordpress.org/support/topic/sql-error-on-activationdeactivation/?output_format=md){
   mydomain}/wp-admin/plugins.php?deactivate=true&plugin_status=all&paged=1&s=
 * Setup: Apache 2.2.27 / PHP 5.5.15 / MySQL 5.5.38
 * [https://wordpress.org/plugins/olimometer/](https://wordpress.org/plugins/olimometer/)

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

 *  [noMATTERdesign](https://wordpress.org/support/users/nomatterdesign/)
 * (@nomatterdesign)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/sql-error-on-activationdeactivation/#post-5187934)
 * I will bump this error:
 * 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‘
   0’ at line 1]
    SELECT COUNT(*) FROM 0;
 * The plugin generated 303 characters of unexpected output during activation. If
   you notice “headers already sent” messages, problems with syndication feeds or
   other issues, try deactivating or removing this plugin.
 * This occurred upon activating the plugin.
 *  Thread Starter [billc108](https://wordpress.org/support/users/billc108/)
 * (@billc108)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/sql-error-on-activationdeactivation/#post-5187935)
 * Sorry to say that I don’t remember how I got around this, but I was able to get
   Olimometer working fine. It might have just been a result of updates which corrected
   the problem. Or it may have been a conflict with another plugin.
 *  [noMATTERdesign](https://wordpress.org/support/users/nomatterdesign/)
 * (@nomatterdesign)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/sql-error-on-activationdeactivation/#post-5187936)
 * So far I haven’t seen a problem arise from this message. Thanks for your response.

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

The topic ‘SQL error on activation/deactivation’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/olimometer_dbeafa.svg)
 * [Olimometer](https://wordpress.org/plugins/olimometer/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/olimometer/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/olimometer/)
 * [Active Topics](https://wordpress.org/support/plugin/olimometer/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/olimometer/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/olimometer/reviews/)

## Tags

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

 * 3 replies
 * 2 participants
 * Last reply from: [noMATTERdesign](https://wordpress.org/support/users/nomatterdesign/)
 * Last activity: [10 years, 11 months ago](https://wordpress.org/support/topic/sql-error-on-activationdeactivation/#post-5187936)
 * Status: not resolved