Add this below <?php in your config.php file:
Code:
define('DISABLE_HOOKS', true);
So now it should resemble this:
Code:
<?php
define('DISABLE_HOOKS', true);
Upload config.php back to the /includes folder. Now access admincp, remove the query from the plugin, save and see if your back online

.
Comment out the disable hooks when done and re-upload the file!
Code:
<?php
// define('DISABLE_HOOKS', true);